我有一个既使用本地存储又使用服务器端 SQL 存储的 Web 应用程序。当我使用 Eclipse 测试我的 APK 文件时,只有具有 localstorage 的 html 页面可以工作,而不是 PHP 文件中的服务器内容。我怎样才能将我的 PHP 文件定向到服务器,因为所有 APK 都将所有内容打包在客户端?
谢谢
I have a web application that uses both localstorage but also server side SQL storage. When I test my APK file using Eclipse only the html pages with localstorage work and not the server stuff in the PHP files. How can I direct my PHP files to go to a server since all the APK does it package everything on the client side?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在 Android 上运行 PHP。 Try SL4A. Web servers can exist on a mobile.有不少在 Android 应用程序中充当本地服务器。
You can run PHP on Android. Try SL4A. Web servers can exist on a mobile. There are quite a few that function as a local server, within Android apps.
continue
You can't run php files on mobile except on the browser
So if you want to run PHP files put them on the server and invoke them to return or accept data from you
To run PHP files you need a web server which doesn't exist on a mobile
I believe that you asked this because you could run javascript & HTML files on the mobile
I will recommend two things
1- If you need to run PHP make ana AJAX request on it and keep it on the server and remember the cross-domain
2- you need to consider the performance of the app you are making because after personal experience its slow
One More thing it works on the chrome because you have a web server (APACHE) on your machine