Create file with php

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

1 Comment

You must be logged in to post a comment.


  1. Kurt, There are at least two possibilities here. First is the ircnroect version of include_HTML. The plugin was written for WordPress 2.3, and the initial version (0.1) has been known not to work under WordPress 2.7. If you are running WordPress 2.7 or newer, download version 0.3 from the project page: Additionally, in order for include_HTML to work, your PHP should be configured with allow_url_fopen = On. Otherwise, the plugin won't be allowed to open remote files.