#8: Revealing All of PHP's Settings

PHP has many features, but not all may be enabled or built in your installation. If you want to see what your particular PHP installation has, a very simple script can show you everything. However, the danger with this script is that it shows so much information that it practically hands a blueprint to potential crackers that says, "Here. These are the weak points. Please break into my system." Therefore, you should delete this script as soon as you're finished with it.

<?php

phpinfo();

?>

The phpinfo() function prints everything that PHP knows about its configuration. I do mean everything. Not only does it show you the status of every single available PHP setting, the location of the php.ini file, and your PHP ...

Get Wicked Cool PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.