Re: printing a php file as a text file

From: Date: Thu, 18 May 2000 14:35:34 +0000
Subject: Re: printing a php file as a text file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-157@lists.php.net to get a copy of this message
On Thu, May 18, 2000 at 02:07:14AM -0400, Chris Sano wrote: > How would I go outputting my PHP file as a text file -- for > example, I have a set of scripts that I plan to release to the > public and would like to make this script viewable through PHP > without having to call a text file. I know I have seen this > somewhere and I'm wondering if any of you guys know how to do > this.. You can take advantage of php's ability to perform it's own syntax highlighting on php source code. Assuming you configured the content handler for application/x-httpd-php[3]-source: % ln -s index.php index.phps The .phps extensions is the default extension for php source. If the user browses a .phps file, php will output the source code with syntax highlighting. -- Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member

« previous php.general (#157) next »