環境変数一覧表($_SERVER, list, each)
<html> <head> <title>環境変数一覧表</title> </head> <body> <center> <table border="1" bordercolor="#666699" cellspacing="0" cellpadding="5"> <caption>環境変数一覧表</caption> <?php while(list($key, $value) = each($_SERVER)) { $value = preg_replace("/[a-z0-9]/", "*", $value); //サンプルのため非表示(この行を削除してください) echo "<tr><td>$key</td><td>", $value, "</td></tr>\n"; } ?> </table> </center> </body> </html>
〔 実行する 〕