I've looked everywhere and I can't find a function that creates a file in PHP. I know how to do it in ASP, but I don't see any functions listed on the php site or in my books that mentions how you do it. Please tell me there is a command that lets you do so. And I don't mean tmpfile().
Thanks
$contents="This is the contents of dummy.txt\n"; $filename="dummy.txt";
$file=fopen($filename, 'w');
fwrite($file, $contents); //This will create the file if it doesn't exist. It will write to the file if it does.
fclose($file);
I'm sorry...fopen will create the file if it doesn't exist when used with the w parameter. Search the phpmanual for fopen for more file manipulation functions.
Thanks.