提示是这个xmlhttprequest cannot load http://localhost/admin/index.php?act=mb_special&op=special_item_add. no 'access-control-allow-origin' header is present on the requested resource. origin 'http://127.0.0.1' is therefore not allowed access.
似乎本地环境不允许,假如非要在本地做,怎么解决此问题
楼主想要做的是什么??你这个请求涉及到跨域请求的东西,跨域直接这样请求是接收不到返回值的。
Header("Access-Control-Allow-Origin: * ");
Header("Access-Control-Allow-Methods: POST, GET");
跨域请求会出现一些不安全的问题
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号