Ist jemand auf das Problem gestoßen, die Seite zu ändern und das Bild nicht zu ändern? Nach der Übermittlung ist das Bild verschwunden.
-wy
-wy 2018-12-26 17:59:02
0
0
1134

Ö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>

-wy
-wy

Antworte allen(0)
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage