Reply to Re: feof()

Your name:

Reply:


Posted by kicken on 06/15/05 06:53

Wolfgang Werners-Lucchini wrote:
>>>> What makes you think it should output nothing?
>>>>
>>>
>>>feof() should be 'true'!
>>
>> Why?
>
>
> The manual says:
> Returns TRUE if the (file pointer is at EOF(1)) or (an error occurs(2))
>
> It says NOT:
> Returns TRUE if an error occurs
>
> or bettert
> Returns TRUE if an READerror occurs
>
> For an empty file EOF-position is 0 (EOF-position is n for file with
> filesize n)
>
> Wolfgang
>
>
>

When you first open a file, no check is done to see what position the
file is actually at. EOF is an error condition, if you go down to the
roots of C, which php's functions are based on. EOF is an error flag
that is set when you reach the end of the file. You can't reach
anything without doing some sort of reading operation though. See the
discussion on devshed for a detailed discussion
http://forums.devshed.com/t244304/s.html&highlight=feof

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация