title: PHP and concurrent file access
body: <p>I'm building a small web app in PHP that stores some information in a plain text file. However, this text file is used/modified by all users of my app at some given point in time and possible at the same time.</p>
  
  <p>So the questions is. What would be the best way to make sure that only one user can make changes to the file at any given point in time?</p>