Re: Source code
| From: | liljim | Date: | Fri, 06 Sep 2002 13:29:38 +0000 |
| Subject: | Re: Source code | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115466@lists.php.net to get a copy of this message | ||
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" <phplist@lgwm.org> wrote in message
news:20020906124659.9807.qmail@pb1.pair.com...
> 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" <adrian.murphy@2020tourism.com> wrote in message
> 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" <rduriancik@indprop.gov.sk>
> > To: "PHP-General" <php-general@lists.php.net>
> > 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
> > >
> >
>
>