Re: show_source()
| From: | �ystein H�land | Date: | Sat, 10 Aug 2002 23:23:11 +0000 |
| Subject: | Re: show_source() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111985@lists.php.net to get a copy of this message | ||
This helped on my laptop (win2000, Apache 1.3.26, php 4.2.1, but when I
uploaded to my webserver (SunOS (sparc), Apache 1.3.xx, php 4.0.6) only the
first row was numbered (yes, I even tried \n instead).
Is there another solution that could work?
"Rasmus Lerdorf" <rasmus@php.net> skrev i meddelandet
news:Pine.LNX.4.44.0208081204560.11226-100000@www.lerdorf.com...
> So just replace \r then. And use str_replace() instead of ereg_replace().
>
> -Rasmus
>
> On Thu, 8 Aug 2002, Øystein Håland wrote:
>
> > I use the following script found at php.net:
> > <html><body><ol><li>
> >
> > <?
> > ob_start();
> > show_source( "THE_FILE!" );
> > $t = ob_get_contents();
> > ob_end_clean();
> > echo ereg_replace( "<br />" , "</li><li>" , $t );
> > ?>
> > </li></ol></body></html>
> >
> > Since the ereg_replace don't work with my php-code i just do
> > echo $t;
> > instead.
> > What I want is to do something like this:
> > echo ereg_replace( "\r\n" , "</li><li>" , $t );
> > (my files are created in a win2000-environment), but this gives the
> > linenumber only for the first line. Anyone see a solution to this?