RTM... www.php.net/flock ---John Holmes...
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 03, 2002 2:53 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Please, can you help me? > > Hello! > I have a big problem and cannot find the answer anywhere, so please, > help me if you can. When I use fwrite() function on webserver, it > sometimes happens, that more then one user accesses the file and the > result is, that the file is corrupted or truncated. A good example of > this problem is webpage access counter. I know, that I can use MySQL > to count accesses, but on some servers I can't. When I have this > counter as a file on my server and read/write into it, there's only a > question of time, when it corrupts itself. Please, can you help me to > solve this problem? I think, that the easiest solution should be to > prevent more that one user to write to that file, but I have no idea, > how to do this. Or is there any other way to prevent that files from > their corruption? I'll be very happy, if you help me with this > problem. > Thank you in advance. > Miloslav Dornak > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php