当前位置:Gxlcms > 数据库问题 > No 'Access-Control-Allow-Origin' header is present on the requested resource.

No 'Access-Control-Allow-Origin' header is present on the requested resource.

时间:2021-07-01 10:21:17 帮助过:1人阅读

********************************************************************** * No ‘Access-Control-Allow-Origin‘ header is present on the requested resource. * 说明: * 之前没考虑到Ajax跨域访问会遇到这个问题,今天梦真在测试的时候看到 * 这个现象,于是查找资料看一下怎么解决。 * * 2016-10-12 深圳 南山平山村 曾剑锋 **********************************************************************/ 一、参考文档: js跨域访问,No ‘Access-Control-Allow-Origin‘ header is present on http://zjblogs.com/js/Access-Control-Allow-Origin.html 二、解决办法: 如果请求的url是PHP页面,则需要在PHP页面中添加代码:header("Access-Control-Allow-Origin: *");

 

No 'Access-Control-Allow-Origin' header is present on the requested resource.

标签:

人气教程排行