Page 1 of 1

fwrite

Posted: Mon May 17, 2004 11:26 am
by dsdsdsdsd
hello; I wish to create (or write to) a .htm file; does fwrite care what the extesion is?

Code: Select all

$filename = "pointer.htm";
$file_pointer = fopen($filename , "w");
fwrite($file_pointer , $DHTML_document_string);
fclose($file_pointer);
the directory itself has 777 file permissions as well as pointer.htm (in the case where I attempt to write to it as opposed to create it);

but yet I get a "failed to open stream: Permission denied" error;

any thoughts?
thanks
Shannon Burnett
Asheville NC USA

Posted: Mon May 17, 2004 11:30 am
by delorian
Is the PHP running in safe_mode, maybe the file isn't yours? Or maybe this file was locked and wasn't unlocked?

Posted: Mon May 17, 2004 11:45 am
by dsdsdsdsd
hello;

I have solved my problem, at least partly;

I have discovered that when I set the user permissions on the pointer.htm file via WS_FTP that the 777 permission that I set did not actually stick; indeed when I refreshed the WS_FTP server-side directories the default 644 would magically re-apear;

Shannon

Posted: Mon May 17, 2004 3:15 pm
by delorian
Probably ftp deamon configuration doesn't let you change file permissions, contact the administrator.