如何在 PALM webOS 中连接到外部数据库(例如 MySQL)
我有一个托管在 wampserver 上的 php 代码和一个托管在 phpmyadmin 上的 MySql 数据库。我尝试使用我在场景辅助文件中编写的Ajax请求函数来调用PHP访问数据库,但它不起作用。
I have a php code which i hosted on wampserver and a MySql database which I hosted in phpmyadmin. I have tried using Ajax request function which I wrote in the scene assistance file to call the PHP to access the database but its not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议不要从设备直接连接到数据库。应用程序通常不会这样做,这是有充分理由的:
大多数应用程序所做的实际上是创建一个服务器端应用程序,该应用程序将以 RESTful 方式处理来自应用程序的请求。因此,您的应用程序将查询类似
http://myappdomain.com/objects/list
的内容并返回 json 或 XML 等。I would advise against connecting straight to the database from the device. Apps generally don't do that and there are very good reasons:
What most apps do is actually create a server side application that will handle requests from the app in a RESTful way. So your app will query something like
http://myappdomain.com/objects/list
and return json or XML etc..