header("Access-Control-Allow-Origin: * ");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
exit;
}
允许跨域请求
猜你喜欢
转载自blog.csdn.net/weixin_43784997/article/details/115234431
今日推荐
周排行