This article describes how khổng lồ use the phpinfo() function to view detailed information about the PHP environment, settings, & more.
Bạn đang xem: How to create phpinfo file and check php information
To view phpinfo() output on our servers, you must have an A2 Hosting account. The information revealed by the phpinfo() function poses a potential security risk, so we vày not post it publicly. Hackers & other malicious actors could use the information from phpinfo() to lớn plan an attack.
View PHP settings with phpinfo Function
You often need to kiểm tra PHP settings during web development. You can bởi vì this by running a script that calls the phpinfo() function. When you load the page in a website browser, the script shows all of the PHP configuration settings for your website site.
To use the phpinfo() function khổng lồ view PHP settings:Create a tệp tin that contains the following code:
Save the tệp tin as info.php or something similar.Upload the tệp tin to your public_html directory.Use your browser to go khổng lồ http://example.com/info.php, where example.com represents your web site"s domain name. The page displays a large amount of information about the PHP installation.
For security reasons, you should disable any calls to the phpinfo() function when website site development và testing is complete.
For more information about the phpinfo() function, please visit http://www.php.net/manual/en/function.phpinfo.php.
Grow Your web Business
Subscribe lớn receive weekly cutting edge tips, strategies, and news you need khổng lồ grow your webbusiness.
Did you find this article helpful? Then you"ll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
GET OUR NEWSLETTER
Web development tips, sale strategies and A2 Hosting news sent to your inbox.