[英]How can I execute a php script on an android device?
The php script is on the android device itself and I need to run it on the device. php脚本位于android设备本身,我需要在设备上运行它。 I have downloaded a few php server apps from playstore and they work fine.
我已经从playstore下载了一些php服务器应用程序,它们工作正常。 But I have to implement this method inside my app so I cannot use another app to perform the server operations.
但是我必须在我的应用程序内实现此方法,因此我无法使用其他应用程序执行服务器操作。
Actual problem:- So i have this Adobe HDS script and there is no java variant of this script. 实际问题:-因此,我有此Adobe HDS脚本,并且此脚本没有java变体。
Here are the three options I can think of. 这是我能想到的三个选择。
1) local execution with sl4a 1)使用sl4a本地执行
As far as I know, the only solution solution to execute scripting languages on Android devices (such as Python, Ruby or PHP) is sl4a , whose PHP support is provided by PHP for Android . 据我所知,在Android设备(例如Python,Ruby或PHP)上执行脚本语言的唯一解决方案是sl4a ,其PHP支持由Android的PHP提供 。 However it doesn't seem to be actively maintained.
但是,它似乎没有得到积极维护。
2) server-side execution 2)服务器端执行
You could host your script on a server and call it from the device through a HTTP request. 您可以将脚本托管在服务器上,然后通过HTTP请求从设备调用脚本。
3) porting to Java 3)移植到Java
If your script is simple you could try to translate it into Java. 如果您的脚本很简单,则可以尝试将其翻译成Java。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.