The following code appends to file successfully and works perfectly.
Code:
$handle = fopen("recent.txt", 'a');
fwrite($handle, $add);
fclose($handle);
However ... this code doesn't seem to write to the file. The only different is that I want this code to set the pointer at the beginning of the file instead of the end. Anybody have any clues to what is going on?
Code:
$handle = fopen("recent.txt", 'r+');
fwrite($handle, $add);
fclose($handle);