title: fgets() returns false even though file is not empty
body: <p>I have a form from which I save the given input into a textfile,<br>
  but I have trouble reading from the saved file:</p>
  
  <pre><code>while(!feof($fileNotizen)) {
  $rawLine = fgets($fileNotizen);
  if($rawLine==false) {
    echo "An error occured while reading the file"; 
  }
  </code></pre>
  
  <p><br>
  <code>$rawLine</code> seems to be always false, even though I use this function before, to fill the textfile: </p>
  
  <pre><code>function addToTable($notizFile) {
   fwrite($notizFile, $_POST["vorname"]." ".$_POST["nachname"]."#");
   $date = date(DATE_RFC850);
   fwrite($notizFile, $date."#");
   fwrite($notizFile, $_POST["notiz"].PHP_EOL);   
  }
  </code></pre>
  
  <p><br>
  And after I submit the form and get the error message, if I check the textfile, everything is there, so the function works correctly.  </p>
  
  <p>If it is of value, I open the file with this command:</p>
  
  <pre><code>$fileNotizen = fopen("notizen.txt", "a+");
  </code></pre>
  
  <p>Could the problem be that the pointer is already at the end of the file and thus returns false?</p>