1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| <?php
if(isset($_GET['phpinfo'])) {
phpinfo();
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title><?php echo $_SERVER['SERVER_NAME'] ?></title>
<style type="text/css">
<!--
html,body{font:120% "Arial";font-variant:small-caps;letter-spacing:.3em;color:#222}h1{margin:0}h2{margin:0;font-size:60%;color:#ed2024}a{text-decoration:none}pre{font:50% "Consolas";letter-spacing:0}#middle dl{float:left}.folders a{color:#8dc434}.folders a:hover{color:#a7df38}.extensions a{color:#00b6f0;font-size:85%}.extensions a:hover{color:#0cf}
-->
</style>
</head>
<body>
<div id="content">
<h1><?php echo $_SERVER['SERVER_NAME'] ?></h1>
<h2><?php echo sprintf('PHP %s | %s | %s', phpversion(), php_sapi_name(), php_uname('s')) ?></h2>
<div id="middle">
<dl class="folders">
<dt>Folders</dt>
<?php
foreach(new FilesystemIterator(__DIR__) as $file):
if($file->isDir()):
?>
<dd><a href="<?php echo $file->getFilename() ?>"><?php echo $file->getFilename() ?></a></dd>
<?php
endif;
endforeach;
?>
</dl>
<dl class="extensions">
<dt>Extensions</dt>
<?php
$extensions = get_loaded_extensions();
natcasesort($extensions);
foreach($extensions as $index => $extension):
?>
<dd><a href="?phpinfo#module_<?php echo $extension ?>"><?php echo $extension ?></a></dd>
<?php
endforeach;
?>
</dl>
</div>
</div>
</body>
</html> |
Partager