dongxia026531 2013-06-18 16:02
浏览 31

从打包的Sencha-Touch 2应用程序将数据写回我的后端服务器

I am trying to write a Sencha Touch application that I can package in PhoneGap for iOS, Android etc... The app allows you to input some data which I would like to save to my backend server using PHP/MySQL. It all works when I use an AJAX proxy as I am testing the app on the same server as my database.

However when I package it for mobile devices I run into the same-domain restrictions of AJAX calls. So I modified it to use the JSONP proxy and I can read the data from the server database but have no idea how to write records back. Do I need to somehow pass the data in the GET request? Obviously the server side PHP needs to be different because of the callbacks and the fact JSONP is forced to used GET requests. I am also trying to get CORS working but currently no success.

So my question is how would I implement writing data back to my backend server from a packaged mobile Sencha app running on a mobile device? Either using JSONP if that is even possible or any other alternatives are welcome?

Many Thanks…

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
    • ¥20 关于URL获取的参数,无法执行二选一查询
    • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
    • ¥15 marlin编译错误,如何解决?
    • ¥15 有偿四位数,节约算法和扫描算法
    • ¥15 VUE项目怎么运行,系统打不开
    • ¥50 pointpillars等目标检测算法怎么融合注意力机制
    • ¥20 Vs code Mac系统 PHP Debug调试环境配置
    • ¥60 大一项目课,微信小程序
    • ¥15 求视频摘要youtube和ovp数据集