How to write text (string) to file in PHP

1 Answer

0 votes
$content = "php programming\n";

file_put_contents("d:\\myfile.txt", $content);

   
/*
run:

myfile.txt
----------

php programming

*/

 



answered Nov 29, 2017 by avibootz

Related questions

...