js ajax接口提示跨域请求 PHP解决办法

header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Methods:GET,POST");
header('Access-Control-Allow-Headers:x-requested-with,content-type');
header("Content-Type: text/html; charset=utf-8");

 

四条代码,自己理解吧,万能方法!

上一篇 抖音在线去水印小程序"西瓜水印"
下一篇 Bandicam_v5.4.1.1914绿色便携特别版
文章列表
1 分享一波XSHELL常用的快捷键
分享一波XSHELL常用的快捷键
2
Screen Translation屏幕翻译v1.7.2
Screen Translation屏幕翻译v1.7.2
3
2023年支付宝集五福攻略方法
2023年支付宝集五福攻略方法
4
Sublime Text 中文版激活码
Sublime Text 中文版激活码
5
禁止WordPress头部加载s.w.org来优化网站速度
禁止WordPress头部加载s.w.org来优化网站速度
大米酱

大米酱管理员

三百六十行,行行出BUG。

本月创作热力图

最新评论
2067608730
2067608730
4月11日
加油大米!quantou
评论于APINEXT