<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/config.php 修改 ~~~ // 控制器類后綴 'controller_suffix' => true, ~~~ # 創建控制器 新建文件 app/home/controller/CatalogController.php ~~~php <?php namespace app\home\controller; use think\Controller; use think\Db; use think\Request; class CatalogController extends Controller { public function index() { return $this->fetch(); } public function create_html() { return $this->fetch(); } public function create() { $data = Request::instance()->post(); $data['parentid'] = 0; $res = Db::name('catalog')->insert($data); if($res>0){ $this->success('添加成功!'); }else{ $this->error('添加失敗!'); } } } ~~~ 在這里我們新建里3個方法, index 是導航,create_html 是創建時的用戶界面, create 是創建數據的實現方法。 新建2個html文件 app/home/view/catalog/index.html ~~~html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>導航</title> </head> <body> <h1>導航</h1> <a href="{:url('home/catalog/create_html')}">創建數據</a> <a href="{:url('home/catalog/read')}">讀取數據</a> </body> </html> ~~~ 新建2個html文件 app/home/view/catalog/create_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/create')}" method="post"> 名稱:<input type="text" name="name" placeholder="名稱"><br> 標題:<input type="text" name="title" placeholder="標題"><br> 關鍵詞:<input type="text" name="keywords" placeholder="關鍵詞"><br> 描述:<textarea name="description" placeholder="描述"></textarea><br> <button type="submit">提交</button> </form> </body> </html> ~~~
                  <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>

                              哎呀哎呀视频在线观看