解决跨域AJAX提示No 'Access-Control-Allow-Origin' header is present on the requested resource,并且The response had HTTP status code 404

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');

其中*代表允许域名,可以更改这个限制调用。

Strjson博客交流群QQ群:892570651
Vultr注册就送$50,可开日本/新加坡等机房,【点击注册
Last modification:September 19th, 2019 at 07:39 pm
If you think my article is useful to you, please feel free to appreciate

One comment

  1. 苍井空

    军哥jj2cm

Leave a Comment