来自子域的Ajax呼叫

I have folders

/ 
includes/class
ajax
m

m is my subdomain and i want to call ajax script ajax/delete_cart.php from includes/class/class.cart.php. In fact i can call from my root typing like "ajax/delete_cart.php"

But the problem is subdomain. I tried to do like this "../ajax/delete_cart.php" but it is not working. What should i do ? I read about cross domain (Setting a cookie on a subdomain from an ajax request) But it is not clear for me.

Browsers don't know about the directory structure of your server. If your URL is on a different hostname, then you need to include that in the URL

//m.subdomain.example.com/ajax/delete_cart.php

This will be subject to the same origin policy.