CODE
$fp = fopen($file_to_write, 'w');
fwrite($fp, $content);
fclose($fp);
echo "Successn";
echo "$file_to_writen";
echo "Has been written";
}
CODE
$fp = fopen($file_to_write, 'w');
That is opening the file which is $file_to_write and in mode
w check out
http://us3.php.net/fopen for more modes in which to use with files.
CODE
fwrite($fp, $content);
fclose($fp);
That is saying to write the content insidet he file. Then it is closing the opening of the file and what not.
CODE
echo "Successn";
echo "$file_to_writen";
echo "Has been written";
}
That is giving a success message that it is all good.
You should try experimenting with these small little functions built right into php. They can come in handy at points during your coding experience.