This means the server needs to respond with a CORS (Cross-Origin Resource Sharing) header. For PHP, you can add the following lines at the beginning of the .php file:
<?php header('Access-Control-Allow-Origin: *'); ?>
'*' means it allows any origin to access the resource.
References:
https://developer.mozilla.org/en/HTTP_access_control#Access-Control-Allow-Origin
http://html5doctor.com/methods-of-communication/
No comments :
Post a Comment