the upload script works in public_html but in subdomain a warning is declared:
Warning: copy(upload/1242452570kimiahost.txt) [function.copy]: failed to open stream: Permission denied in /home/site/public_html/subdomain/request.php on line 127
what i have to do?
the upload directory has a 755 permissin on cpanel.
if($file>0){ //if1
$register='1';
if (($_FILES["file"]["size"]>100*1024)){
$error_message='<br> error.';
$register='0';
}
else { //else1
if ($_FILES["file"]["error"] > 0){
$error_message='<br>error';
$register='0';
}
else //else2
{
$file=time() . $_FILES["file"]["name"];
$file="upload/" . $file;
copy($_FILES["file"]["tmp_name"],$file);
} //else2
} //else1
} //if1
is the script safe? ofcourse i haven't restricted file type.