Having some problems with CHMOD
I want to open a file into a textarea and then be able to edit that file. The code below is when I write the contents to the file:
$open_file is the file I am writing to.
//directory to the file
$the_file = $DOCUMENT_ROOT.\"/$open_file\";
41 chmod(\"$the_file\", 0755) or die(\'cant chmod\');
42
43
44 //open, write and close file
45 $fp = fopen($the_file,\"w+\");
46
47
48
fwrite($fp,$file_contents);
fclose($fp);
I get chmod error message on line 41:
\"chmod failed: Operation not permitted in....\"
Is this something I need to work out with my web host?
What am I missing?