|
hi all, anyone can help me,
i be stack in some reference source.
//==============upload File Function============\\
function uploadFile() {
global $attachments;
while(list($key,$value) = each($_FILES[filename][name]))
{
if(!empty($value))
{
$filename = $value;
array_push($attachments, $filename);
$dir = "uploads/$filename";
chmod("uploads",0777);
$success = copy($_FILES[filename][tmp_name][$key], $dir);
}
}
if ($success) {
echo " Files Uploaded Successfully<BR>";
SendIt();
}else {
exit('Sorry the server was unable to upload the files');
}
}
i do not know why, the function is always return exit('Sorry the server was unable to upload the files');
anyone help me!
|