Fork me on GitHub

tp3.2开启允许跨域

  在入口文件<?PHP下加上

header('Access-Control-Allow-Origin:*');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods:GET, POST, OPTIONS');
posted @ 2019-02-26 15:58  big2cat  阅读(808)  评论(0编辑  收藏  举报