Hi,
In PHP, how do I prevent code that accesses the same piece of data from corrupting each other?
Using Java, if I had two methods that accessed a shared piece of data, I could use the "synchronized" keyword to solve this problem. Is there something like this in PHP?
My problem is that I have multiple scripts that write to the same text file and I want to prevent these scripts from writing to this same file at the same time if more than one person runs the scripts at a point in time.
Any help would be appreciated.