PHP 跨域配置

来源:互联网 发布:sql 有事物的存储过程 编辑:程序博客网 时间:2024/06/17 00:02

// 指定允许其他域名访问
header(‘Access-Control-Allow-Origin:*’);
// 响应类型
header(‘Access-Control-Allow-Methods:POST’);
// 响应头设置
header(‘Access-Control-Allow-Headers:x-requested-with,content-type’);

0 0