File Directory Php

$numoffile = 5;
// Fix path of your file to be uploaded, don't forget to CHMOD 777 to this folder
$file_dir = "/home/webs/dmonster.com/subdomain/files/";
if ($_POST) {
for ($i=0;$i<$numoffile;$i++) {
if (trim($_FILES['myfiles']['name'][$i])!="") {
$newfile = $file_dir.$_FILES['myfiles']['name'][$i];
move_uploaded_file($_FILES['myfiles']['tmp_name'][$i], $newfile);
$j++;
}
}
}
if (isset($j)&&$j>0) print "Your file(s) has been uploaded.
";
print "
";
for($i=0;$i<$numoffile;$i++) {
print "
";
}
print "";
print "
";
?>