function request(url, callback) { fetch(url, {mode: 'cors', credentials: 'include', headers: new Headers({ 'X-Requested-With': 'XMLHttpRequest' })}) . ...
分类:
Web程序 时间:
2018-07-26 18:41:26
阅读次数:
167
1.跨域的问题不是服务器的问题,是浏览器不允许跨域 从而报错。 2.协议 ip 端口,只要其中一个前后端不同,浏览器都视为跨域。 3.只有X-Requested-With为XMLHttpRequest的情况下才会发生跨域的问题。 二$.get $.post $.ajax都是XMLHttpReques ...
分类:
其他好文 时间:
2018-07-26 16:17:06
阅读次数:
170
header("Access-Control-Allow-Origin: 域名");header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");header('Access-Contro ...
分类:
其他好文 时间:
2018-07-24 18:06:38
阅读次数:
146
有时候使用本地数据库进行查询数据会报以下错误: 此错误是数据返回到ICursor无法确定获取列的索引,那么需要加上一下代码即可。 完整代码Demo: ...
分类:
移动开发 时间:
2018-07-24 17:59:00
阅读次数:
196
使用PHP连接MySQL 8的时候,可能会发生如标题所示的错误: 发生这种错误,是由于MySQL 8默认使用了新的密码验证插件:caching_sha2_password,而之前的PHP版本中所带的mysqlnd无法支持这种验证。解决这个问题,有两种办法。 一种办法是升级PHP支持MySQL 8的新 ...
分类:
数据库 时间:
2018-07-24 00:49:38
阅读次数:
1226
报错信息:django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the enviro ...
分类:
其他好文 时间:
2018-07-18 23:18:26
阅读次数:
168
原文地址:http://blog.csdn.net/ausboyue/article/details/52775281 Linux SSH命令错误:ECDSA host key "ip地址" for has changed and you have requested strict checking ...
分类:
其他好文 时间:
2018-07-18 21:44:13
阅读次数:
260
一、docker的安装: 先查看自己额版本是否是3.10以上,或者centos7以上 1. uname -r 2. 安装docker命令: yum -y install docker-io 3.启动docker命令: service docker start 二、 docker上安装mysql 1. ...
分类:
数据库 时间:
2018-07-14 19:26:52
阅读次数:
141
centos系统自带的git版本过低,当使用git拉取、推送、克隆的时候可能会报错,常见的错误: error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/zem ...
分类:
其他好文 时间:
2018-07-10 19:12:01
阅读次数:
178
99: Cannot assign requested address 解决Nginx监听虚拟VIP方法: 出现上面的问题就是在物理网卡上没有与配置文件例监听的IP相对应的IP,解决方法是在/etc/sysctl.conf 中加入如下内核参数配置 ...
分类:
其他好文 时间:
2018-07-08 20:06:25
阅读次数:
928