?>
;
;
->upload_name=['myfile']['name'->upload_tmp_path=['myfile']['tmp_name'->file_size=['myfile']['size'->file_type=['myfile']['type'->allow_file_type = ('jpeg','jpg','png','gif','bmp','doc','zip','rar','txt','wps','xlsx','ppt'->file_save_path=['DOCUMENT_ROOT']."/file/up/" upload_file(
(->file_size>2*1024*1024 ""file_type!="image/jpeg" && $this->file_type!="image/pjpeg"){
echo "文件类型只能是 jpg 格式";
exit();
}
=->getFileExt(->(!(,-> "上传文件类型格式错误"
((->
=->file_save_path.(!( (
=."/".().(1,1000).(->upload_name,(->upload_name,"."
((->upload_tmp_path,("utf-8","gb2312","" ->upload_name."上传成功" "上传失败" "上传失败"
getFileExt(=( ["extension"?>
http://www.bkjia.com/PHPjc/440411.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/440411.htmlTechArticle1、upload.php !DOCTYPE HTML "-//W3C//DTD HTML 4.01 Transitional//EN"htmlheadtitleAdd文件上传_www.jbxue.com/titlemeta http-equiv="content-type" content="text/html; charset=UTF-...