全部博文(1159)
分类: PHP
2015-10-22 08:14:51
There is already an open-source project called “PHP for Android”(PFA), and its official site is: . The source code for porting PHP is available at: .
However, there are some major limitations of the PFA project. First,
the PFA project is based on the SL4A project (Scripting Layer for
Android
, official site: ) whose major goal is aimed at providing support for quickly prototype
applications for Android on the device itself using high-level scripting
languages. To speak more simply, the PFA project, or the SL4A project,
are helping you develop Android applications with PHP scripts. But our
need is, using PHP to produce dynamic web pages on Android devices, and
using web browsers on Android devices to render these web pages. So
there will be many differences in the porting architecture.
Seond, the PFA is deployed as a standard Android application. But we
simply need a PHP runtime. The PHP runtime will be run as a standalone
service by the web server, like CGI. It will be built into the Android
system, so we don’t have to wrap it as an Android application.
In the following articles, I will write about how to make a standalone PHP runtime on Android. Some of the work are borrowed from the PFA project, and I will mainly discuss the special work needed for our goal.