方法一:
直接在函数的开头添加 header(‘Access-Control-Allow-Origin: *’);
这个方法不需要使用官方中间件
方法二:
在入口文件加入这个就可以跨域请求了
路径:\public\index.php
直接在函数的开头添加 header(‘Access-Control-Allow-Origin: *’);
这个方法不需要使用官方中间件
在入口文件加入这个就可以跨域请求了
路径:\public\index.php
跨域请求~
前端跨域请求方案实现总结
om/a/11900000125503resource,需要给Nginx服务器配
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M