I might be missing something, but.... Wouldn't this suffice?
: http://www.php.net/manual/en/function.highlight-file.php

Maintains formatting *and* colours things up nicely.


-James

"Lallous" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think it is also good to fetch $mem as:
>
> $fp = fopen('index.htm', 'r');
> $mem = fread($fp, filesize('index.htm'));
> fclose($fp);
>
> that will keep index.htm formatted as is.
>
> "Adrian Murphy" <[EMAIL PROTECTED]> wrote in message
> 001b01c2559f$aa8f3c30$1a8f43d9@ADE2">news:001b01c2559f$aa8f3c30$1a8f43d9@ADE2...
> > add nl2br() to make it look pretty e.g
> >
> > <span>
> > <?
> > $mem = join('', file('index.htm'));
> >
> > $mem = htmlspecialchars($mem);
> > $mem = nl2br($mem);
> > echo $mem;
> > ?>
> > </span>
> > ----- Original Message -----
> > From: "Roman Duriancik" <[EMAIL PROTECTED]>
> > To: "PHP-General" <[EMAIL PROTECTED]>
> > Sent: Friday, September 06, 2002 11:53 AM
> > Subject: [PHP] Source code
> >
> >
> > > How I show in IE source code of html page with php ?
> > >
> > >
> > > roman
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>



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

Reply via email to