技术教程
当前位置:首页 > 技术教程

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

( 更新:07-28   加入收藏)
四条代码,自己理解吧,万能方法!

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");

相关阅读