【发布时间】:2019-07-24 04:26:40
【问题描述】:
我们已经在 IONIC 中使用 anguler js 开发了 android 应用程序。
我们正在通过浏览器进行测试,但在控制台中出现错误。
跨域请求被阻止:同源策略不允许读取远程 http://example/abc/service.php 的资源(原因:CORS 请求未成功)
跨域请求被阻止:同源策略不允许读取远程 http://example/abc/service.php 的资源(原因:多次 CORS 请求未成功)
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
error_reporting(E_ALL);
?>
尝试使用 Access-Control-Allow-Origin:null 和 Access-Control-Allow-Origin: example.com
还是不行
我们在 IONIC 框架
的 android 应用程序开发中使用 anguler js帮助!如果你知道!
【问题讨论】:
标签: javascript php android web-services ionic-framework