Kristian, flock() is useful in a multiuser environment where two or more users might try to e.g edit a file at the same time. If this will not happen with what you are doing then you have no need for flock().
If, for example, you have a web application that updates a file then the application could use flock() to check whether the file may be opened or is already in use. It could be in use by another user of the same web application. If the file is not in use then using flock() will indicate to other instances of the application that the file is already in use. Using flock() does not actually prevent someone else opening it. I think it is this basic information you were asking, apologies if I understood wrongly. The article you refer to shows how to use/call flock(). Hope this helps. Regards Chris Kristian Laren wrote: >Hi > >I've read the article on http://www.php.net/manual/en/function.flock.php but >i stille don't understand what flock() is doing, what it's good for, how i >use it and what it help >Would someone please help understand it?? > >Thanks > Kristian Larsen > Denmark > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php