Welcome

首页 / 网页编程 / PHP / PHP与JS交互时跨域访问的Header设置方式

header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');