note 9337 added to highlight_file

From: Date: Sat, 28 Oct 2000 13:00:53 +0000
Subject: note 9337 added to highlight_file
Groups: php.notes 
Request: Send a blank email to php-notes+get-7125@lists.php.net to get a copy of this message
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. http://www.php.net/manual/function.highlight-file.php

« previous php.notes (#7125) next »