PHP解决跨域 No 'Access-Control-Allow-Origin' header is present on the requested resource.

header("Access-Control-Allow-Origin:*");
/*星号表示所有的域都可以接受,*/
header("Access-Control-Allow-Methods:GET,POST");

错误如下:

Failed to load ad http://adm.ceshi.com/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'n 'http://web.ceshi.com' is' is therefore not allowed access.

jquery.min.js:6 Cro Cross-Origin Read Blocking (CORB) blocked cross-origin response se http://test.jollyeng.com/ wi/ with MIME type application/json. See ee https://www.chromestatus.com/feature/5629709824032768 for for more details.

猜你喜欢

转载自blog.csdn.net/Bel_Ami_n/article/details/82226084