Muat naik lakaran kecil gagal, mengapa?
   伊丽莎白.@芳
 伊丽莎白.@芳 2022-02-08 12:18:59
0
3
1339

Muat naik thumbnail gagal, kenapa?

   伊丽莎白.@芳
 伊丽莎白.@芳

membalas semua(1)
逆旅行人a

Huraikan masalah secara terperinci, sebaiknya tampal kod

  • balas fungsi awam add(){ $courses=D('kursus'); jika (IS_POST){ $date['name']=I('name'); $date['descs']=I('descs'); $date['content']=I('content'); $date['cateid']=I('cateid'); $date['update_date']=Date("Y-m-d h:i:s"); $upload->maxSize=5*1024*1024; $upload->exts=array('jpg','gif','png','jpeg'); $upload->rootPath='./Public/'; $upload->savePath='uploads/'; $upload->autoSub = palsu; jika ($_FILES['pic']['name']) { $info=$upload->upload(); jika (!$info) { $this->error($upload->getError() ); }lain{ $_POST["pic"]=$info["pic"]["savePath"].$info["pic"]["saveName"]; } }lain{ $_POST["pic"]="uploads/empty.jpg"; } jika ($kursus->buat($data)){ if($courses->add()){ $this->success('添加课程成功!',U('lst')); }lain { $this->error('添加课程失败!'); } }lain { $this->error($courses->getError()); } kembali; } $cateres=D('cate')->select(); $this->assign('cateres',$cateres); $this->display(); } 后台显示图裂开,数据库中图片的路径是上传前图片的路径,如名称.jpg,Public中沇与有
     伊丽莎白.@芳 pengarang 2022-02-09 10:52:09
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan