Hello World in PHP

PHP is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.

Hello world example

This is the "Hello world !" source code basic example.

<? echo "Hello World !" ?>

Save it with in /var/www/hello.php file then run it opening your browser on board IP using this URL:



PHP and Lighttp web server are already installed by default on the Arietta bootable Debian Linux microSD.

If you need to install it on a new distribution use these commands:

~# apt-get update
~# apt-get install php5

See the phpinfo() output generated by the default PHP installation.

Related links