註釋php
function getname($exname){
$dir = "upimages/";
$i=1;
if(!is_dir($dir)){
mkdir($dir,0777);
while(true){
$name=$i.".".$exname;
break;
}
$i++;
}
return $dir.$name;
$exname=strtolower(substr($_FILES['upfile']['name'],(strrpos($_FILES['upfile']['name'] ,'.')+1)));
move_uploaded_file($_FILES['upfile']['tmp_name'], $uploadfile);
{
$uploadfile="admin/".$uploadfile;
}
else
{
$uploadfile="";
}