解决ajxa跨域问题

解决跨域问题:

在头部添加如下代码

header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding");
posted @ 2019-09-25 15:18  安东尼1974  阅读(176)  评论(0编辑  收藏  举报