|
Posted by Andy Hassall on 06/14/05 02:07
On Tue, 14 Jun 2005 00:45:05 +0200, "Wolfgang Werners-Lucchini"
<wwl@musensturm.de> wrote:
>>>The code here outputs '0'. Why?
>>>----------------------------
>>>$filename = "test.dat";
>>>if (!file_exists($filename)) {
>>> touch($filename); // Create blank file
>>> chmod($filename,0666);
>>>}
>>>$fp=fopen($filename,'r');
>>>if ($fp && !feof($fp)) echo ftell($fp); // should output nothing!
>>>fclose($fp);
>>
>> What makes you think it should output nothing?
>>
>feof() should be 'true'!
Why?
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Navigation:
[Reply to this message]
|