have I got this in the correct forum this time ;-)
Hi guys I hope you can help me with this:
When I run the below code on my server I get the following errors:
Warning: chown failed: Operation not permitted in /home/virtual/battlegrounds/home/httpd/html/mistbook/create.php on line 13
Warning: chmod failed: Operation not permitted in /home/virtual/battlegrounds/home/httpd/html/mistbook/create.php on line 14
As far as I can tell the code is correct and should work, however if I'm getting "failed" does this indicate that something on my hosts server has been set to not allow me to do this?
Is there any reason that these functions should be disabled?
$info = "some text to go in the file"
$whatfile = fopen("file.dat", "w");
fwrite($whatfile, $info);
fclose($whatfile);
chown("file.dat", "newowner");
chmod("file.dat", 0777);