Re: How to tell if the file is already locked with flock()???
| From: | Jason Barnett | Date: | Fri, 16 Jul 2004 14:49:56 +0000 |
| Subject: | Re: How to tell if the file is already locked with flock()??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190712@lists.php.net to get a copy of this message | ||
Scott Fletcher wrote:
Hi!Do you mean within PHP code? If that's the case then this is taken care of by the flock() function... it checks the file's status and based on the parameter(s) that you use it will give you access or not. I believe that if another script tries to access the file but doesn't try to flock() it then they can simply do whatever they want with the file (someone correct me here if I'm wrong).How do we tell if the file is already locked when someone use a flock()on the file?? FletchSOD