<?php
highlight_string('<?php phpinfo(); ?>');
?>
...alebo...
<html>
<head>
<title>Source Display</title>
</head>
<body bgcolor="white">
<?php
$script = getenv("PATH_TRANSLATED");
if (!$script) {
echo "<br /><b>ERROR: Script Name needed</b><br />";
} else {
if (ereg("(\\.php|\\.inc)$", $script)) {
echo "<h1>Source of: " . getenv("PATH_INFO") . "</h1>\n<hr />\n";
highlight_file($script);
} else {
echo "<h1>ERROR: Only PHP or include script names are allowed</h1>";
}
}
echo "<hr />Processed: " . date("Y/M/d H:i:s", time());
?>
</BODY>
</HTML>