Write string to text file : Text File Write « File Directory « PHP






Write string to text file


<?php
   $subscriberInfo = "g@java2s.com";
   $fh = fopen("./text.txt", "at");
   fwrite($fh, $subscriberInfo);
   fclose($fh);
?>

           
       








Related examples in the same category

1.How to add text to the file