write to text file

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.