douzoudang1511 2014-01-28 01:45
浏览 40

PHP没有使用Cordova / Phonegap在Xcode模拟器上执行

I am creating a non-native iOS application in an HTML5/Javascript/CSS3 implementation. I have an external PHP file on my localhost and am trying to communicate with it using jQuery and AJAX.

Everything works fine if I make the request to the PHP file in my browser and I get the desired response, so there is no problem code-wise.

However when running it in Xcode's simulator, the PHP doesn't execute and I just receive the whole PHP script as the response. I don't know why it isn't executing and I've been stuck on the problem for ages, Please can anyone help?

I have already tried putting header("access-control-allow-origin: *"); at the top of the php page but I am still getting no result.

Would appreciate any suggestions!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题