PHP

Posted on

PHP processes webpage requests via a web browser and it does it dynamically depending on circumstances that can be programmed.

 sudo apt install php php-mbstring -y

To test if php installation was successful a test web-page with php commands can be created. First navigate to the directory /var/www/html/ and delete the file index.html and create a new file with name index.php

cd /var/www/html
sudo rm index.html
sudo touch index.php
sudo nano index.php

in the file include the line:
echo “<?php phpinfo ();?>” > /var/www/html/index.php
save the file and on the raspberry pi web browser enter localhost for the webpage and this should open the PHP Test Web-page

A list of php commands is listed on http://php.net/urlhowto.php