php设置允许跨域

// 指定允许其他域名访问

header('Access-Control-Allow-Origin:*');

// 响应类型

header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");

// 响应头设置

header('Access-Control-Allow-Headers:x-requested-with,content-type');
 
 
 
posted @ 2018-07-23 22:28  炜华  阅读(197)  评论(0编辑  收藏  举报