I've been trying to get my show source function on my site to work for quite some time. My first problem is tryink to make the link to the show source site (showsource.php). Keep in mind the link is in an include file so the filename is a variable. Here is the line in my func.php file that must have the code to point to the link:
echo "<center>Search <b>::</b> Copyright Information <b>::</b> ***********</center><p />";/*Replace Astrixes with Code for 'Show Source' Link*/
I also want to make sure the code in showsource.php is correct:
<?php
$script = getenv ("PATH_TRANSLATED");
if(!$script) {
echo "<br /><b>ERROR: Script Name needed</b><br />";
} else {
if (ereg("(\.php|\.inc)$",$script)) {
echo "<h3>Source of: $PATH_INFO</h3>\n<p />\n";
highlight_file($script);
} else {
echo "<h3>ERROR: Only PHP or include script names are allowed</h3>";
}
}
echo "<p />;"
func_footer();
?>
Thanks
Xeon