in reply to Re: File locking
in thread File locking

For just reading the file, locking is not nessessary and wouldn't even work.

This is only true if the file is never going to be modified programmatically. If it is, then it needs to be flock'ed in shared mode (LOCK_SH) unless you don't care about the fact that the file might change while you're trying to read it. Usually you do care, 'cos if you don't then I don't see why you are bothering to lock it at all. ;)