请问这个函数为什么上传不了?
function upfoto($path, $rmuno, $fromfile, $fname, $fotofile, $exds=".jpg|.jpeg|.png|.bmp|.gif|.eml|.rar", $maxsize="122880") #120KB
{
// if(filesize($fromfile)>$maxsize)
if($_FILES['$fromfile']['size']>$maxsize)
return("filesize exceed ".(ceil(10*($maxsize/1024))/10)."KB");
$fotofile = $rmuno."/".$fname;
$fotopath = $path.$fotofile;
if(!file_exists($path.$rmuno)) mkdir($path.$rmuno,0777);
$extends = "/(.+)(".str_replace(".", "\.", $exds).")$/i";
if(preg_match($extends, $fotofile)){
echo $fotopath;
if(!copy("$fromfile", "$fotopath")) return("photo upload fail");
}else{
$fotofile="";
return("unsupport photo filename");
}
return;
}
其中函数的第三个参数是传人的文件表单名字。出错提示:
Warning: copy(Array): failed to open stream: No such file or directory in F:\project\superstars\chi\inc\gufunc.php on line 103
photo upload fail