发布于 2024-12-18 16:35:01 字数 174 浏览 2 评论 0原文

我有一个既使用本地存储又使用服务器端 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

飘然心甜 2024-12-25 16:35:01

您可以在 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.

半窗疏影 2024-12-25 16:35:01

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文