ID: 10993
Updated by: swm
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

The results of filesize() are cached. You will need to
reload the cache for this file in order that it return the
correct result.

See clearstatcache() and filesize() documentation.

Previous Comments:
---------------------------------------------------------------------------

[2001-05-21 13:34:21] [EMAIL PROTECTED]
Hiya

run this test script and and watch the output differ depending on using filesize or 
not

        $fp = fopen('file.test', "a+b");
        
        //(un)comment this line
        filesize('file.test');
        
        fwrite($fp, "boe");
        fclose($fp);

        $fp2 = fopen('file.test', "a+b");
        fseek($fp2, 0);
        echo fread($fp2, filesize('file.test'));

        unlink('file.test');

Greetz,

Wico

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10993&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to