Forum Moderators: coopster
i am using the following code to generate static html pages in the /static_html/ folder.
// write to static_html
$data = $complete_page;
$file = $include_path . 'htdocs/static_html' . $static_page;
if (!$file_handle = fopen($file,"a")) {
exit("Cannot open file");
}
if (!fwrite($file_handle, $data)) {
exit("write to file");
}
fclose($file_handle);
static_html is owned by nobody.nobody and is chmod 755.
single path files are generated perfectly - e.g. /mypage.html.
but when i try to generate /subfolder/mypage.html it dies with error message saying Warning: No such file or directory
i have tried chmod 777 but still doesn't work.
should i create these directories manually beforehand? or is there a way around?
many thanks!
(edited for clarity)