can't create a file
Posted: Mon Oct 23, 2006 2:49 pm
I'm trying to learn how to create files, so i wrote a simple php script that shoulld, theoretically create a new .txt file.
My Code is:
My Output is:
Can anybody see a problem or how to fix this?
My Code is:
Code: Select all
<?php
$filename = "testFile.txt";
echo "string created. ";
$filehandle = fopen($filename,'w') or die("can't open file");
echo "file opened. ";
fclose($filehandle);
echo "file closed. ";
?>Code: Select all
string created. can't open fileCan anybody see a problem or how to fix this?