Posted By

G470 on 11/02/10


Tagged

php text


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

userpiv
Desoxena


write to text file


 / Published in: PHP
 

  1. $mycontent = "My sample text";
  2. $myFile = "inhalt.txt";
  3. $fh = fopen($myFile, 'w') or die("can't open file");
  4. $stringData = $mycontent;
  5. fwrite($fh, $stringData);
  6. fclose($fh);

Report this snippet  

You need to login to post a comment.