Yucateco wrote:
Try this:
$fp = fopen("./directory/filename.extension", "w+");
fputs($fp, "---data---");
fclose($fp);
Of course, you should check if the file exists BEFORE creating it. If you don't, you could lose an important file... Use the function file_exists (http://www.php.net/manual/en/function.file-exists.php) Replace ---data--- by your data.
Hub. Lem.
Two problems:
1) I am using windows 2000, so I have to use:
$fp = fopen("<path>", "wb");
2) THAT is the line that causes an error. The preprocessor prints "Permission denied in <path\script> on line 64"
Because of this error, I am assuming I have missed a setting in IIS, or that the permissions on the script are wrong. What do I have to do to give the script permissions under IIS to add and edit files on the web server?