I am using this sample script I got from php.net but it doesn't seem to be setting the permissions correctly. If I then go in and run a chmod on them I can make the change but I need it to be 0777 when the directory is created. Any ideas?
What it is doing is first makes a folder named the job_id, then makes inside that folder a folder named the date.
so when my form gets processed it runs the function:
MakeDirectory($file_dir . $job_folder . $dir_date, 0777);
Thanks in advance.
function MakeDirectory($dir, $mode)
{
if (is_dir($dir) || @mkdir($dir,$mode)) return TRUE;
if (!MakeDirectory(dirname($dir),$mode)) return FALSE;
return @mkdir($dir,$mode);
}