<?
include "funlib.inc";
$subtitle = " PHP version: ".PHP_VERSION;
outHeadTop("Leafwa - PHP information", $subtitle, 0);
?>
<p>
| <a href="leafwa.php">Main screen</a>
| <a href="viewsettings.php">Settings</a>
|
<hr noshade>
<?
/* need to extract the PHP information buffer from the page which phpinfo()
would otherwise generate, or we end up with a complete embedded page.
Taken from a sample @ php.net */
// start the output buffer, this means nothing will be displayed until the buffer is closed
ob_start();
// call the phpinfo function to display the php info
phpinfo();
// get contents of output buffer, which is everything that would have been printed from phpinfo();
$val_phpinfo .= ob_get_contents();
// flush the output buffer and delete the contents
ob_end_clean();
// get a substring of the php info to get rid of the html, head, title, etc.
$val_phpinfo = substr( $val_phpinfo, 554, -19 );
// change the width of the table to 450
//$val_phpinfo = str_replace( 'width="600"', 'width="450"', $val_phpinfo );
echo $val_phpinfo
?>
<hr noshade>
</body>
</html>