PHP File Write

, by Prashant Gunjal

Program :

<html>
<head><title>Write Data in File</title></head>
<body>
<?php
$myfile="abc_new.txt";
$fh=fopen($myfile,'w');
if($fh)
{
$string_data="Hii .. I am happy !!! ";
fwrite($fh,$string_data);
}
else
echo 'Error';
fclose($fh);
?>
</body>
</html>




0 comments: