Re: How to include a txt file on php?
| From: | Evan Nemerson | Date: | Tue, 27 May 2003 06:34:23 +0000 |
| Subject: | Re: How to include a txt file on php? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149054@lists.php.net to get a copy of this message | ||
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()
--
Humanity's first sin was faith; the first virtue was doubt.
-Unknown