<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 更新數據 創建文件 app/home/view/catalog/update_html.html ~~~html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>修改數據</title> </head> <body> <h1>創建數據</h1> <a href="{:url('home/catalog/index')}">返回導航</a> <form action="{:url('home/catalog/update')}" method="post"> 編號:{$item.id}<br> <input type="hidden" name="id" value="{$item.id}"> 名稱:<input type="text" name="name" placeholder="名稱" value="{$item.name}"><br> 標題:<input type="text" name="title" placeholder="標題" value="{$item.title}"><br> 關鍵詞:<input type="text" name="keywords" placeholder="關鍵詞" value="{$item.keywords}"><br> 描述:<textarea name="description" placeholder="描述" value="{$item.description}"></textarea><br> 上級目錄: <select name="parentid"> <option value="0" {eq name="$item.parentid" value="0"}selected{/eq}>根目錄</option> {foreach $toplists as $i} <option value="{$i.id}" {eq name="$item.parentid" value="$i.id"}selected{/eq}>{$i.name}</option> {/foreach} </select><br> <button type="submit">修改</button> </form> </body> </html> ~~~ 并在 讀取單條數據 頁面加入鏈接 ~~~html <a href="{:url('home/catalog/update_html',['id'=>$item.id])}">更改</a> ~~~ 新建 update_html 對應的方法 ~~~php public function update_html($id) { $data = Db::name('catalog')->find($id); $this->assign('item',$data); $lists = Db::name('catalog') ->where('parentid',0) ->select(); $this->assign('toplists',$lists); return $this->fetch(); } ~~~ 新建 更新 的實際操作的方法 ~~~php public function update() { $data = Request::instance()->post(); $res = Db::name('catalog')->update($data); if($res>0){ $this->success('修改成功!'); }else{ $this->error('修改失敗!'); } } ~~~ ![](https://box.kancloud.cn/d8623cf09eba3737708d9421e0b59eb5_794x548.png) ![](https://box.kancloud.cn/d4e46f8ed72a6e9a943768513144e265_794x548.png) ![](https://box.kancloud.cn/d6df892bffe3e51c6a6abe5cc4c7ef6c_794x548.png) 到這里一個簡單的增刪改查的例子
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看