RE: [PHP] How to include a txt file on php?

From: Date: Tue, 27 May 2003 07:15:39 +0000
Subject: RE: [PHP] How to include a txt file on php?
Groups: php.general 
Request: Send a blank email to php-general+get-149059@lists.php.net to get a copy of this message
I used it :) -----Original Message----- From: Justin French [mailto:justin@indent.com.au] Sent: Tuesday, May 27, 2003 1:53 PM To: Miranda, Joel Louie M; 'Evan Nemerson' Cc: php-general@lists.php.net Subject: Re: [PHP] How to include a txt file on php? Is there any reason why include() couldn't be used? Justin on 27/05/03 5:51 PM, Miranda, Joel Louie M (jmiranda@pd.state.gov) wrote: > Its working now, I've tried a different syntax. > > Include > > > Thanks, > Louie > > -----Original Message----- > From: Evan Nemerson [mailto:evan@coeus-group.com] > Sent: Tuesday, May 27, 2003 2:34 PM > To: Miranda, Joel Louie M > Cc: php-general@lists.php.net > Subject: Re: [PHP] How to include a txt file on php? > > > file returns an arrray. either do implode("", file()); or use > file_get_contents() instead > > the readfile() Rasmus mentioned looks like this: > <?php readfile('/dynamic/ree_menu.wbc'); ?> > and will output directly to the browser. > > Look at: > php.net/readfile > php.net/implode > php.net/file > php.net/file_get_contents > > > On Monday 26 May 2003 11:29 pm, Miranda, Joel Louie M wrote: >> Rasmus, >> >> <?php $readfile = file("/dynamic/ree_menu.wbc"); print $readfile; ?> >> >> I've tried this approach, But it does not work, any Ideas? >> >> Thanks, >> Louie >> >> -----Original Message----- >> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com] >> Sent: Tuesday, May 27, 2003 11:30 AM >> To: Miranda, Joel Louie M >> Cc: 'php-general@lists.php.net' >> Subject: Re: [PHP] How to include a txt file on php? >> >> On Tue, 27 May 2003, Miranda, Joel Louie M wrote: >>> Im doing some html coding's. The pages are quite huge but has the >>> same contents. I wonder how do you include a text file on php? >> >> readfile()

« previous php.general (#149059) next »