Re: [PHP-GENERAL] printing a php file as a text file

[email protected] (Jon Parise)
Newsgroups php.general
Message-ID <[email protected]>
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 ([email protected])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.