php - Test writing to file at the same time as anyone else using file_put_contents -


I have a form on the page that after submitting its content the file has been written using file_put_contents. I use LOCK_EX to lock while locking the file. But there is a way to do that it really works and it happens to see that when the file is called twice at the same time.

  $ answer = file_put_contents ($ file, $ skier, FILE_APPEND | LOCK_EX);  

Thank you in advance

you launch En Bet / Shell You can try to execute your PHP code at the same time and access the same file


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -