How to check php version in website

Creating a PHP info page in Website

Using the steps below I’ll show you how to create a PHP info page that will allow you to not only see your PHP version, but also all the PHP options that are currently in use.

Step :01

Login to your cPanel.


Step :02
Under the Files section, click on File Manager, then select Web Root and click on Go.

Step :03
At the top-left, click on + New File, name the file info.php and click on Create New File.

Step :04
Now open the file with the Code Editor in cPanel and enter in the following code:

<?php
phpinfo();
?>

Then click on Save Changes at the top-right hand corner of the screen.

Step :05
Now if you visit your website such as http://example.com/info.php you should see the PHP info page. This example screen shot shows that this server is running PHP version 5.2.17, and that the PHP configurations are getting loaded from the file /home/userna5/public_html/php.ini

php info page

Step :06
You can scroll further down the PHP info page, to also see individual PHP options that you can set.

Leave a Reply