tp5接口允许跨域请求
在入口文件加上这个
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Methods:POST,GET"); header("Access-Control-Allow-Headers:x-requested-with,content-type"); header("Content-type:text/json;charset=utf-8");
在入口文件加上这个
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Methods:POST,GET"); header("Access-Control-Allow-Headers:x-requested-with,content-type"); header("Content-type:text/json;charset=utf-8");
评论
评论列表
暂无评论,快来抢沙发吧~