Hi Infolock,
thanx for the reply, but I'm afraid I didn't make myself clear (apparantly).
I was playing with the
highlight()-function and the script shown on php.net. As php.net told, I added this to the httpd.conf-file:
Code: Select all
<Location /source>
ForceType application/x-httpd-php
</Location>
and then created a script containing this code:
Code: Select all
<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>
?>
As said on php.net, I stored it as "source" in the apache-rootdirectory.
PHP.net says:
but that doesn't work for me! I need to store the file "source" as "source.php" and then I can use it like this:
Code: Select all
http://www.example.com/source.php/path/to/script.php
But I remember I had it setup (once upon a time) so that I could use it with:
Code: Select all
http://www.example.com/source/path/to/script.php
And THAT's what I want to be able to do again! Do you understand what I mean here?