[英]how to connect phonegap with web sql
I am working on project and I will implement by HTML5
and I will use phonegap
to give me application in multi platforms and I have database
in my server
and I was thinking to connect the database
with the application by php
but there is problem because phonegap
does not accept php
files ..... and now I don't know how to connect
the app with the database
and i saw this link http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html and it is talking about local database and i want to connect with server database
我正在研究项目,并且将通过HTML5
实现,并且我将使用phonegap
在多个平台上为我提供应用程序,并且我的server
有database
,并且我正在考虑通过php
将database
与应用程序连接,但是存在问题,因为phonegap
确实不接受php
文件.....,现在我不知道如何connect
应用程序与database
connect
,我看到此链接http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html它正在谈论本地数据库,我想与server database
连接
is there any solution to connect phonegap
with server
database
? 有什么解决方案可以将phonegap
与server
database
连接? and it will be better if there is tutorial about that way 如果有关于这种方法的教程会更好
You can using Jquery Ajax requests that will call php methods which deal with database and return data in json or xml format and when the ajax request success it will return you the data and you can deal with it using phonegap 您可以使用将调用php方法的Jquery Ajax请求,该方法处理数据库并以json或xml格式返回数据,并且当ajax请求成功时,它将返回您的数据,您可以使用phonegap进行处理
this tutorial if you don't use Jquery and use java script 本教程,如果您不使用Jquery并使用Java脚本
http://simonmacdonald.blogspot.com/2011/12/on-third-day-of-phonegapping-getting.html http://simonmacdonald.blogspot.com/2011/12/on-third-day-of-phonegapping-getting.html
and here if you use jquery http://www.indiageeks.in/phonegap-jquery-ajax-example-jsonjavascript-object-notation-response/ 在这里,如果您使用jquery http://www.indiageeks.in/phonegap-jquery-ajax-example-jsonjavascript-object-notation-response/
and here example how to convert data to json in php 这里是示例如何在php中将数据转换为json
http://www.tutorialspoint.com/json/json_php_example.htm http://www.tutorialspoint.com/json/json_php_example.htm
feed me back in any not obvious thing 用任何不明显的东西喂我
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.