I'm trying to create a file and write some text in it, however i get the following error message:
Warning: fwrite(): supplied argument is not a valid stream resource
here's my code:
$fn = "write/file.php";
$FileHandle = fopen($fn, 'w+') or die("can't open file");
$stringData = "text";
fwrite($fn, $stringData);
fclose($FileHandle);
i set CHMOD of 'write' folder to 777 which resolved another error i used to get..
Warning: fopen: failed to open stream: Permission denied
but now i stuck to this...any ideas?