[thelist] A tip with PHP
Bill Haenel
bill@webmarketingworx.com
Tue Jul 17 13:31:14 2001
I tried it that way thinking the same thing, and I got a good result, except
that since $fichier comes from an array based on $d[] (or something - I'd
have to go back and look to be sure) it drops the number of items in the
array at the end of the HTML file when it displays. So if you have an HTML
file with 12 lines, it displays the page, and at the end of the page there's
a nice "12".
BH
> -----Original Message-----
> From: thelist-admin@lists.evolt.org
> [mailto:thelist-admin@lists.evolt.org]On Behalf Of Patti Ames
> Sent: Tuesday, July 17, 2001 13:43
> To: thelist@lists.evolt.org
> Subject: Re: [thelist] A tip with PHP
>
>
> --- Seb <seb@members.evolt.org> wrote:
> > > >
> > > > > $page = join ('', file ($fichier));
> > > > > echo $page;
> >
> > You're actually wasting resources by indirectly assigning the
> > contents of a
> > file into another variable.
> >
> > eg:
> >
> > <? $fichier = $whatever;
> > include($fichier); ?>
> >
> > When you include a file, it only evaluates what's inside PHP
> > delimiter tags,
> > so if you leave them out it treats your included file as HTML to be
> > output.
> >
>
> Since you're using HTML files, why not use readfile? What
> advantage does include have over readfile? It seems like
> include would have more overhead.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>