1
0
mirror of https://github.com/php/web-php.git synced 2026-03-24 15:22:19 +01:00
Files
archived-web-php/source.php3
1998-06-25 16:57:27 +00:00

44 lines
849 B
PHP

<?php
require("shared.inc");
commonHeader("Show Source");
if (!isset($page_url)) {
echo "No page URL specified.";
commonFooter();
exit;
}
echo "Source of: $page_url<BR><hr noshade><FONT SIZE=-1>\n";
$legal_dirs = array(
"/manual" => 1,
"/include" => 1);
$dir = dirname($page_url);
if ($dir && $legal_dirs[$dir]) {
$page_name = $DOCUMENT_ROOT . $page_url;
} else {
$page_name = basename($page_url);
}
echo("<!-- $page_name -->\n");
if (file_exists($page_name)) {
show_source($page_name);
}
if (!strstr($page_name,"include/shared.inc")) {
?>
<hr noshade>
And if you're interested in what's behind the <B>commonHeader()</B> and <B>commonFooter</B> functions,
you can always take a look at the
<A HREF="/source.php3?page_url=/include/shared.inc">
source of the shared.inc</A> file.
<P>
<?
}
commonFooter();
?>