[thelist] A tip with PHP

Damien Cola damien.cola at synaptique.co.uk
Tue Jul 17 10:32:58 CDT 2001


> Although I've got a question :
>
> > $page = join ('', file ($fichier));
> >
> > echo $page;
>
> Why not use something like :
> include($fichier);
>
> What do you think, people?

I think that:
"The include() statement includes and evaluates the specified file."

That is not what I want to do, I want the content of a file to be placed in
my variable $page. Then, only after, display it. (you could perform some
"search and replace" before echoing the page)

If you do include, obviously you gonna get errors, since the included file
must be specialy tailored for your purpose, that is beginning by ?> and
eventually finishing by <?php in order for the html to be displayed
correctly..

The only shorter option I see in my case is:
echo join ('', file ($fichier));

but then I don't know php much, I do things one way, but open to
suggestions.

Cheers,
Damien COLA - Synaptique
Synaptique (UK) Ltd.
Eurogate Business Park
TN24 8XW, Ashford, Kent
Tel: +44 (0)870 777 0026
Fax: +44 (0)870 777 0027
http://www.synaptique.co.uk
Offices: Ashford, Brussels, Helsinki
Milan, Montreal, Paris, Rabat, Toulouse





More information about the thelist mailing list