Differences
This shows you the differences between two versions of the page.
tech:others:web_server_info [2014/11/15 09:13] |
tech:others:web_server_info [2014/11/15 09:13] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PHP Script to display web server info ====== | ||
+ | <code php> | ||
+ | <?php | ||
+ | echo '<table style="border-collapse: collapse;">'; | ||
+ | foreach ($_SERVER as $key => $val) | ||
+ | echo '<tr onMouseOver="this.style.backgroundColor=\'AAAABB\';" onMouseOut="this.style.backgroundColor=\'transparent\';"><td style="font-weight: bold; border-right: 2px solid #000000;">'.$key.'</td><td style="width: 100%;">'.(is_array($val)?nl2br(print_r($val,true)):$val).'</td></tr>'; | ||
+ | echo '</table>'; | ||
+ | ?> | ||
+ | </code> |