php上传文件(简易版)
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);
本文来自博客园,作者:小ྀ青ྀ年້,转载请注明原文链接:https://www.cnblogs.com/dalaowang/p/11843403.html