Chomauk
Programmer
- Jun 8, 2001
- 130
Hi, at one time this worked and now it doesn't. Can anyone tell me what I need to do to create a file in my directory. I'm using a webhost and here is the code:
That's if for now but I'm getting an error of
fopen(Confirm_3848f0f4a.php): failed to open stream: Permission denied for all three...fopen, fwrite and fclose.
I've read some stuff on chmod but don't understand(yes I'm a newbie). Can anyone tell me what I need to do to create a file?
thanks
"Failure is the tuition you pay for success."
~ Walter Brunell ~
Code:
<?php
$ID = substr(uniqid("ID"),6);
$data = "This is a new file entry!\n";
$file = "Confirm_". $ID. ".php";
echo $file;
$file_handle = fopen($file,"w+");
fwrite($file_handle, $data);
fclose($file_handle);
?>
fopen(Confirm_3848f0f4a.php): failed to open stream: Permission denied for all three...fopen, fwrite and fclose.
I've read some stuff on chmod but don't understand(yes I'm a newbie). Can anyone tell me what I need to do to create a file?
thanks
"Failure is the tuition you pay for success."
~ Walter Brunell ~