<!-- Here is the page source code for code.php -->
<?php
// ===============================================================
// ===== This function displays the HTML and PHP code on the =====
// ===== web page specified in $fileName =====
// ===============================================================
function dump_page($fileName)
{
$fp = fopen($fileName, "r");
echo "<table cellpadding=\"10\" cellspacing=\"0\" border=\"1\">\n";
echo "<tr>\n";
echo "<td>\n";
echo "<pre>\n";
echo "\n";
echo "<!-- Here is the page source code for $fileName -->\n\n";
while (!feof($fp))
{
$in = fgets($fp, 4094);
echo htmlspecialchars($in);
}
echo "</pre>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
fclose ($fp);
}
// ===============================================================
?>
|