标签:src ant 遇到 mil ubuntu image round 请求头 ace
ajax访问后台接口遇到报错
解决方法:
在被请求的php文件中加入请求头部
header(‘Access-Control-Allow-Origin: *‘);
例如: 我的后台接口是用laravel框架写的,所以在laravel的index.php中加入请求头部
后台返回的数据
跨域请求Access to XMLHttpRequest at 'http://localhost/index.php/api/user/login'
标签:src ant 遇到 mil ubuntu image round 请求头 ace
原文地址:https://www.cnblogs.com/lishudong/p/12616273.html