This segment of the PHP tutorial illustrates the use of file handling function fwrite() and its example
This segment of the PHP tutorial illustrates the use of file handling function fwrite() and its example
Syntax
int fwrite ( file_handle ,data_string [,length ] )
Code
<?php
$file=fopen("aa.txt","a+");
echo file_get_contents("aa.txt");
fwrite($file,"\n
so have a behavour of the human being ");
echo "<br>".file_get_contents("aa.txt");
?>
Output
we all are human
we all are human so have a behaviour of the human being