XMLHttpRequest
cannot load http://example.com/test.php.
No Access-Control-Allow-Origin
header is present on the requested resource. Origin http://eample.com
is therefore not allowed access.
How to resolve it. i added following headers in that php file:
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept,
Authorization, X-Request-With');
header('Access-Control-Allow-Credentials: true');
i replace my domain name 'codeXXX' with 'example' dont confuse with that