With a phpinfo file, you can use your web browser to request a large amount of information about the server’s current PHP configuration.
The information includes, among other things, the PHP version and server details. Since every system is set up differently, phpinfo() is often used to check configuration settings.
Creating a phpinfo file
You can create a phpinfo file within your hosting package to view the PHP settings specific to your account. Follow the steps below:
1. Log in to DirectAdmin.
2. In the menu, go to System Info & Files → File Manager, and click on the public_html folder.
3. Click 'New File' at the top, enter phpinfo.php as the file name, and then click 'Create'.
4. Right click the new phpinfo.php file and select 'Edit'. Insert the following code into the file and click 'Save File' to store the changes.
<?php // Show all information, defaults to INFO_ALL phpinfo(); ?>
5. You can now view the information by going to yourdomain.com/phpinfo.php in your web browser. Replace yourdomain.com with your own domain name.