前段与后端交互,解决跨域问题

在代码头加入:post header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Methods:OPTIONS, GET, POST'); // 容许option,get,post请求 header('Access-Control-Allow-Headers:x-requested-with'); // 容许x-r
相关文章
相关标签/搜索