PHP File Management
Posted: Fri Jun 27, 2003 6:24 am
Hi,
I am creating a web module in PHP that needs to access a file mostly for reading but there will be times when I need to write to it. The question is how can I safely access the file without two seperate threads accessing the file at the same time for writing, I know I can use flock() but I have been reading that this is not completely reliable. Does anyone know a reliable way to syncronise write access to a file between threads.
thanks.
I am creating a web module in PHP that needs to access a file mostly for reading but there will be times when I need to write to it. The question is how can I safely access the file without two seperate threads accessing the file at the same time for writing, I know I can use flock() but I have been reading that this is not completely reliable. Does anyone know a reliable way to syncronise write access to a file between threads.
thanks.