On Thursday, February 14, 2002, at 03:26  PM, Kevin Stone wrote:

> How can I open a local PHP script and view its code to the browser?  The
> Readfile() method appears to parse and execute the code.  The Fopen()
> method appears to parse and then not execute the code, leaving a blank
> screen, or at the very least displaying any non-PHP text existing in the
> script.  This is obviously rare question because I can't find any
> references on this list or on Usenet.  Is there a trick to this?  Or is
> it simply not possible.

This is just a guess, but have you tried this?

$text = "/* ";
$text .= readfile($fp);
$text .= " */";

To comment the code?

Just a guess.  (And it would result in nested comments, not sure if that 
is a no-no for the parser or not).



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to