note 13640 deleted from function.flock by jimw

From: Date: Sat, 08 Dec 2001 19:09:40 +0000
Subject: note 13640 deleted from function.flock by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22083@lists.php.net to get a copy of this message
Here is an important note that might save some time if you have arrived at this page for the same reason I did. Often times on a page I will write data to a file and then read it back out. I was confused when only part of the file was being extracted in the read function. I thought maybe I was writing and reading the file at the same time...this turned out not to be the cause of my problem. I was reading the file from the beging to the end by using the filesize function and fread...but when you run filesize on a file, it is cached and thus when filesize is run on the same file...it reports the old filesize. Hence, it is a good idea to clear the cache using the clearstatcache() void function after to write to a file if you plan on accessing it again on the same page.

« previous php.notes (#22083) next »