A printenv in php

Everyone is familiar with the tried and true printenv.cgi script that comes with the Apache source. Here’s a version in php.

 $key_value) {
    print $key_name . " = " . $key_value . "
"; } ?>

The only thing I don’t like about this is the inability to easily disable it. To disable printenv.cgi all you had to do was make it non-executable. For “printenv.php” you’ll need to either move it to someplace the web server can’t access, or cripple it by, for example, removing the “php” from “<?php”.