Writing to a txt with php

i am using the following php:

 <?php 
$filename ="aboutme.txt"; 
$writeError = false; 
$fileStream; 
if (!$fileStream = fopen($filename,'w')) { 
	$writeError = true; 
} else { 
	if (!fputs($fileStream, stripslashes($stuffToWrite))) { 
		$writeError = true; 
	} else { 
		fclose($fileStream); 
	} 
} 
print "&wroteFile=".$writeError; 
?> 

the problem i am having is that it will create the txt file on the server, but it will not write the contents…it just leaves me with an epty aboutme.txt…anybody have a clue?

thanks for your help