note 9337 deleted from function.highlight-file by didou
| From: | didou@php.net | Date: | Mon, 04 Aug 2003 22:07:50 +0000 |
| Subject: | note 9337 deleted from function.highlight-file by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53359@lists.php.net to get a copy of this message | ||
Note Submitter: designer@ricochet.net
----
Here's another possiblity to see colorful source without using the highlight_file command.
Create sym link files with something like
ln -s index.php index.phps
then you could add code to a footer.php or signiture file for the pages you created the sym links
for
<?
if ($PHP_SELF) {
$source = $PHP_SELF ."s"; // create text link to symbolic file
}
echo "<a href=\"$source\">View Source</a>";
?>
make sure your Apache httpd.conf file includes the line
AddType application/x-httpd-php-source .phps
That's it! You probably want to keep any sensitive config stuff in a separate configs.php file
which doesn't have a sym link and just call it like include("configs.php"); for pages
that need it.