in reply to Is it always necessary to lock a text file?

Locking the file is not necessary when reading only, and when writing only if there is a possibility of more than one write happening simultaneously (as in the case of a cgi script or multi-user environment) If you are the only person using your script, or if it is a standalone script that only runs on one machine, locking is not necessary.
  • Comment on Re: Is it always necessary to lock a text file?