Posted By

qrist0ph on 05/13/08


Tagged

io


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

romanos
mrjthethird
vali29


Write to a file with PHP


 / Published in: PHP
 

  1. $myFile = "testFile.txt";
  2. $fh = fopen($myFile, 'w') or die("can't open file");
  3. $stringData = "Bobby Boppern";
  4. fwrite($fh, $stringData);
  5. $stringData = "Tracy Tannern";
  6. fwrite($fh, $stringData);
  7. fclose($fh);

Report this snippet  

You need to login to post a comment.