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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 模板的定義 ## 默認模板 默認的情況下,模板文件與控制方法有著對應關系。 例如:假設應用目錄為app | 控制器方法 |模板文件 | | -- | -- | -- | |Index/index|/app/View/Index/index.php| |Index/list|/app/View/Index/list.php| |Public/login|/app/View/Public/login.php| |Public/reg|/app/View/Public/reg.php| |User/index|/app/View/User/index.php| |User/edit|/app/View/User/edit.php| <br/><br/> #### 控制器示例代碼:/app/Controller/IndexController.php ~~~ class IndexController extends Controller{ public function index(){ $this->display(); } } ~~~ #### 模板示例代碼:/app/View/Index/index.php ~~~ <!doctype html> <html> <head> <meta charset="utf-8"> <title>MAGPHP框架</title> </head> <body> 歡迎使用MAGPHP微框架! </body> </html> ~~~ <br/><br/> ## 指定模板 如果需要指定一個模板文件,則需要給display()方法指定 **第二個參數**,參數為模板文件的 **路徑** 或 **控制器和方法名** 。 (這里我們先不管第一個參數,只是設定為 空,在 <span style="color:red;">模板中變量與賦值</span> 章節會對第一個參數詳細說明) #### 指定路徑的方式: ~~~ $this->display('', './app/Views/Index/index.php'); $this->display('', './app/Views/Goods/list.php'); $this->display('', './app/Views/User/index.php'); $this->display('', './app/Views/User/get.php'); ~~~ #### 控制器和方法的方式: 以下效果與上面路徑方式一一對應,效果完全一樣。 ~~~ $this->display('', 'Index/index'); $this->display('', 'Goods/list'); $this->display('', 'User/index'); $this->display('', 'User/get'); ~~~ <br/><br/>
                  <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>

                              哎呀哎呀视频在线观看