Hi there, I have a small filemanager to handle file uploads to my server, but every time I try to updload a file I receive these messages:
Warning: Unable to create '/home/exported/viniciusc/public_html/cpdee_new/documentos/Regulamentos/': Is a directory in /home/exported/viniciusc/public_html/cpdee_new/adm/blocks/filemanager.php on line 94
Warning: Unable to move '/tmp/phpDE2W6t' to '/home/exported/viniciusc/public_html/cpdee_new/documentos/Regulamentos/' in /home/exported/viniciusc/public_html/cpdee_new/adm/blocks/filemanager.php on line 94
Warning: chmod failed: Operation not permitted in /home/exported/viniciusc/public_html/cpdee_new/adm/blocks/filemanager.php on line 95
bldriver.htm
Well, here's the piece of code that peforms the action:
function copyFile($path,$file)
{
//if(is_uploaded_file($file))
// {
move_uploaded_file($file, "$path/$file_name");
chmod("$path/$file_name",744);
// }
}
where $path is the complete path for the file to be moved eg: /home/exported/viniciusc/public_html/cpdee_new/documentos/Regulamentos/
Any ideas????
Thanks