时间:2021-07-01 10:21:17 帮助过:18人阅读
file_upload_limit : 10, //配置上传个数
mysql_connect("localhost","root",""); mysql_select_db("upload"); $file_name=mktime().$file_name; //+设置欲上传的文件名 if (!@move_uploaded_file($_FILES[$upload_name]["tmp_name"], $save_path.$file_name)) { HandleError("文件无法保存."); exit(0); }else{ mysql_query("insert into pic (id,name) values (NULL,'$file_name')"); //+上传到数据库 }