Why do you open the file in append mode, if you know, the file doesn't contain something? You should also change your fwrite line, because you use the wrong handle
$filename = 'sometext.txt'; //empty text file
$size = filesize($filename);
if( $size <= 0 ) {
$handle = fopen($filename, 'w');
fwrite($handle, 'blah blah blah...');
fclose($handle);
}
$handle = fopen($filename, 'r');
$current = fread($handle,filesize($filename));
If you want to append something to an existing file, you have to change your compare statement to >=