I have a php script that opens a json file, rewrites it, then closes it. But there's also a site that needs to access that json file, so it's very likely that multiple users will be reading the contents of the json file with ajax while php is simultaneously changing the file.
I'm curious what this will do?
I'm assuming that it would cause some serious issues, would it be better to create a new file in php, make the changes, then rename and overwrite the old file?