Re: ? about PHP includes
| From: | Christian Reiniger | Date: | Fri, 03 Aug 2001 06:55:04 +0000 |
| Subject: | Re: ? about PHP includes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61090@lists.php.net to get a copy of this message | ||
On Friday 03 August 2001 05:59, Craig Westerman wrote:
> <?php
> $txtfile = fopen("text.txt", "r");
>
> while (!feof($filePointer))
$txtfile instead of $filePointer
> {
> $line = fgets($txtfile, 250);
fgets reads a line (i.e. up to a newline) with at most the specified
numbers of characters. So you read the entire file, line by line.
Use $Text = fread ($txtfile, 250); instead.
> print $line;
> }
>
> close($txtfile);
fclose
--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)
"Software is like sex: the best is for free" -- Linus Torvalds