How to run phpinfo()

In order to run phpinfo(), create a phpinfo.php file on your server.

You will need to have ftp access to your server.

create a file call phpinfo.php that contains the following code:

<?php
phpinfo()
?>

To run the code, simply open the page you created in your web browser by entering its address in the navigation bar following the example below:

https://example.com/phpinfo.php

given that the file phpinfo.php is at the root of the server. Replace https://example.com/ by your own server address or URL.

You should see a page displayed similar as the one below: