Hi at all.
I have a php file that creates the sitemap. In the end, the file creates a sitemap.xml file in the site root.
$nome_file_index = "sitemap.xml";
chmod($nome_file_index, 0666);
$file = fopen($nome_file_index, "w") ;
fwrite($file, stripslashes(utf8_encode($elenco_sitemap)));
fclose($file);
On cwp this thing does not seem to work ... does not save the file to the root of the site, but in the server root.
Not here /public_html/domain.com/sitemap.xml
But here /sitemap.xml
Something does not work ...
Not only with the sitemap file, but with any file created by php, from any script.
I noticed that if you launch the file manually, everything seems to work correctly.
The file is saved in the wrong place when, for example, is run by crontab.
Missing some configuration cwp? You can solve it without putting hand to all the files already created?