复制代码 代码如下: /** * 图片上传方法 * $maxsize=500000 = 500k; * $updir=”up/”; * $upfile=$_FILES[“file_img”]; */ public function Get_file_upload($upfile, $maxsize, $updir, $newname = ‘date’) { if ($newname == ‘date’) $newname = date(“Ymdhs”); //使用日期做文件名 $name = $upfile[“name”]; $type = $upfile[“type”]; $size = $