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.
PHP File Management
Re:PHP File Management
Firstly the chance that two threads will use the same file at the same time is close to none since it goes so fast.
And secondly use a database system like MySQL.
And secondly use a database system like MySQL.