Adakah sesiapa menghadapi masalah mengubah suai halaman dan tidak mengubah suai imej Selepas penyerahan, imej itu hilang?
-wy
-wy 2018-12-26 17:59:02
0
0
1136

Edit fungsi awam(){
$Article=D('Article');
$Article=$Article->find(I('id'));
$this->assign('Article',$ Articler); I('desc'); ['Cateid'] = i ('Cateid'); muat naik Think baharu (); // $upload->maxSize =3145728 ;//Tetapkan saiz muat naik lampiran
                                                                                                                                                                                       upload->rootPath ='./'; // Tetapkan direktori akar untuk memuat naik lampiran
                                                                                                                $upload-> ; uploadone ($ _ fail ['pic']);                    $date['pic']=$info['savepath'].$info['savename'];
               }
                    
            }                                                                                                             if($Article->create($date)){
jika ($ artikel- & gt; save ()) {
$ this- & gt; kejayaan ("修改 文章 成功!", u ('lst'), 3);
} else {
$ this- & gt; error ('修改文章失败!','',3);
            }
            }lain{
                            ($this->error->er->       }
            kembali;
        }
        $cateres=D( 'cate')->select();
        $this->assign('cateres',$cateres);
        $this->display();
    }  



<tr>
                                <th><i class="require-red">*</i>缩略图:<                 <td>
                                    <if condition="$Articler ['pic'] neq ''">
                                    <img src="__ROOT__{$Article.pic}" height="50">            lt;else/>
                                    无缩略图
                                                                                                              
                                    <input id="pic" name="pic" size="50" value="{$Article.pic}" type="file">
           ;      ;     
                            </tr>

-wy
-wy

membalas semua(0)
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan