No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore no
2016-10-12 13:54
507 查看
No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore no错误解决
问题:在php中使用ajax跨域访问报错No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access.解决:
1、如果请求的url是PHP页面,则需要在PHP页面中添加代码:header("Access-Control-Allow-Origin: *"); 2、如果请求的url是静态的html页面,则需要在页面中添加meta标签代码:<meta http-equiv="Access-Control-Allow-Origin" content="*
相关文章推荐
- No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域访问解决方案
- ajax跨域请求:No 'Access-Control-Allow-Origin' header is present on the requested resource
- No 'Access-Control-Allow-Origin' header is present on the requested resource.
- No 'Access-Control-Allow-Origin' header is present on the requested resource.
- 解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误
- No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '
- JS跨域:No 'Access-Control-Allow-Origin' header is present on the requested resource
- ajax跨域(No 'Access-Control-Allow-Origin' header is present on the requested resource)
- No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is there
- js跨域访问,no 'access-control-allow-origin' header is present on the requested resource
- No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域访问解决方案
- No 'Access-Control-Allow-Origin' header is present on the requested resource.
- “No 'Access-Control-Allow-Origin' header is present on the requested resource”
- No 'Access-Control-Allow-Origin' header is present on the requested resource.
- No 'Access-Control-Allow-Origin' header is present on the requested resource
- 解决“No 'Access-Control-Allow-Origin' header is present on the requested resource.”
- No 'Access-Control-Allow-Origin' header is present on the requested resource
- 本地Ajax跨域访问 No 'Access-Control-Allow-Origin' header is present on the requested resource.
- No 'Access-Control-Allow-Origin' header is present on the requested resource. 报错解决。
- No 'Access-Control-Allow-Origin' header is present on the requested resource