phpandroidwebserver

Is there any way to run PHP on Android


I've tried to open my PHP script in the built in Android browser, but I only see my code, as text, and the PHP doesn't run. Why is that ?

How can I run PHP on my Android device ? Is there a way to set up PHP and a web server on an Android device ?


Solution

  • PHP is a language that is used on a web server (http server), not on a web client (browser). This means that in order to run PHP on your android device (and not just display a web page served from a web server hosted elsewhere, online), you need to install a web server on your device. Luckily there's a few apps which provide this functionality.

    Note that setting up PHPMyAdmin, (if you need that for managing databases) can be a bit tricky, as you will need to download the extra packages for it, if the app you're using does not bundle it.