1、前台form表单处添加 enctype="multipart/form-data"
2、
//上传文件保存到目录 header("content-type:text/html;charset=gb2312"); $tmp_name=$_FILES['excel']['tmp_name']; $filename = iconv('utf-8','gb2312',$_FILES['excel']['name']);//保证上传之后文件名称不被转义 move_uploaded_file($tmp_name, "uploads/upload/".$filename);