Write following code into cross-origin's .htaccess file
Example:
Ex 2 .
in php file : header('Access-Control-Allow-Origin: *');
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
Example:
- You open "http://example.com" (here you see the cross-origin error of http://abc.com)
- Open .htaccess of abc.com and paste above code.
Ex 2 .
in php file : header('Access-Control-Allow-Origin: *');