Like the question, if you sometimes need to add content to a file, how can you ensure that what you write will not be opened and written in by another person?
What I want is to generate something randomly before the writing operation starts, and then delete it after the operation is completed;
File Lock
From : http://php.net/manual/zh/func...