OK I'm trying to create a bunch of files on the fly using FWRITE() but before I do that I want to be sure I can use FRWITE() to create a file that isn't yet there, and write the required data too it.
here's what I'm using right now for example.
$filename = "matrix.html";
// open file
$fh = fopen($filename, 'w') or die("Could not open file!");
// write to file
fwrite($fh, "Welcome to The Matrix, Neo") or die("Could not write to file");
// close file
fclose($fh);
But this is doing nothing, it's not failing or kicking me any errors it appears to be completing but the file MATRIX.html is not created.
I'm assuming it will be created in the same directory as this script since I haven't specified for it to go anywhere else. Any ideas? Once I figure this out I'm sure I can do what else is required. I searched thru the old posts here on this similar problem, but no real resolved soliution.
I have CHMOD'd the directory the file is in to 777 so it really should work.
ThanKS