Home > Article > Backend Development > Application of PHP - Complete Manual for Chat Room Development (2)_PHP Tutorial
Now we finally have everything we need to write a new file:
(as the current mainstream development language)
// Open the file, And truncate the file length to 0
$open_file = fopen("messages.html", "w");
//Write the header information of the file
fputs($open_file, $header );
// New line
// (Use stripSlashes, because we don’t want all the escape characters to appear in the message file) ;
// Close the file
fclose($open_file);
?>
http://www.bkjia.com/PHPjc/508609.html
www.bkjia.com