I am trying to get my code to create a directory. The code for it so far is:
$filename = "/home/findchea/public_html/upload/";
if (!file_exists($filename)) {
$old_umask = umask(0);
mkdir($filename, 0777);
umask($old_umask);
}
But I am getting this error: Warning: mkdir(/home/findchea/public_html/upload/): Permission denied in /home/findchea/public_html/upload.php on line 27
I made sure that $filename is forrect and it is, I also made sure that the script has full permissions but it still does not work. Line 27 is the mkdir.
What can I do to fix this?