Problem with creating a file
Posted: Tue Jul 13, 2004 12:52 pm
Hi All,
I'm having a little problem with creating a file and writing to it. I'm getting the error on this line:
The error I'm getting is;
I know the file name is correct, or at least valid, and I'm pretty sure about permissions, though this doesn't look like an error related to permissions.
I've tried using 'w','w+','a','wb' (not sure what wb is, though it was in the docs), but to no avail. Any ideas?
I'm having a little problem with creating a file and writing to it. I'm getting the error on this line:
Code: Select all
$file_handle = fopen("/path/to/the/file/to/create/$curr_date_$_POST[surname]_$_POST[first_name].txt",'w+');Line 167 is the code shown above.PHP wrote: Warning: fopen(/path/to/the/file/to/create/1_2.txt) [function.fopen]: failed to create stream: No such file or directory in /path/to/file/doing/the/creation/file.inc on line 167
I know the file name is correct, or at least valid, and I'm pretty sure about permissions, though this doesn't look like an error related to permissions.
I've tried using 'w','w+','a','wb' (not sure what wb is, though it was in the docs), but to no avail. Any ideas?