Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

write in a file using php

<?php
$myfile = fopen("file_name.txt", "w") or die("Unable to open file!");
$txt = "Hello world
";
fwrite($myfile, $txt);
$txt = " Php.
";
fwrite($myfile, $txt);
fclose($myfile);
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #write #file #php
ADD COMMENT
Topic
Name
5+2 =