- Sun Feb 02, 2020 10:16 pm #160
PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as.
Code: Select allAfter installing php, make sure to restart Apache service to render PHP in Web Browser.
# yum install php
Code: Select allNext, verify PHP by creating following php script in the Apache document root directory.
# systemctl restart httpd.service
Code: Select allNow view the PHP file, we just created (phpinfo.php) in Linux Command Line as below.
# echo -e "<?php\nphpinfo();\n?>" > /var/www/html/phpinfo.php
Code: Select all
# php /var/www/html/phpinfo.php OR # links http://127.0.0.1/phpinfo.php