Öffentliche Funktion edit(){
$Article=D('Article');
$Article=$Article->find(I('id'));
$this->assign('Article',$ Articler); I('desc'); ; ['Cateid'] = i ('Cateid'); new Thinkupload (); // $upload->maxSize =3145728 ;//Legen Sie die Größe des Anhang-Uploads fest
upload->rootPath ='./'; // Stammverzeichnis für das Hochladen von Anhängen festlegen
$upload-> ;uploadOne($_FILES['pic']);
. $date['pic']=$info['savepath'].$info['savename'];
}
}else{
. }
if($Article->create($date)){
if($Article->save()){
$this->success("修改文章成功!",U('lst'),3);
}else{
$this->error( '修改文章失败!','',3);
}
}else{
. $this->error($Article->getError());
}
return;
}
$cateres=D( 'cate')->select();
$this->assign('cateres',$cateres);
$this->display();
}
<tr>
<th><i. class="require-red">*</i>缩略图:</th> <td>
<if condition="$Articler ['pic'] neq ''">
;else/>
<input id="pic" name="pic" size="50" value="{$Articler.pic}" type="file">
</td>
</tr>