please help me i am getting this error on the file i created following your tutorial for php i dont know what to do or what am i doing wrong to get this error message, i cant figure it out and was wondering if you can help me resolve it, it says:

Warning: fwrite(): supplied argument is not a valid stream resource in index.php on line 29


this is how line 29 looks like:
if (fwrite('/* created '.time().' */ \n'.$handle, $new) === FALSE) {
echo "Err #30";
exit;