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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                **視圖概述** 視圖作為MVC模式中的終端環節,在web編程中負責dom結構的展示。grace 使用 php作為“天然模板“,您不必再去學習枯燥無聊的模板語法,系統更不必浪費資源去完成復雜的解析工作! **視圖文件創建及命名規則** ~~~ 視圖文件命名?: 1、控制器名稱_方法名稱.php?//此種命名系統會進行自動展示 2、視圖名稱.php?//需要手動調用 視圖文件位置?:?/分組文件夾/views/對應視圖文件 ~~~ **控制器與視圖間的變量傳遞** 您定義的視圖在控制內被自動或者使用 $this->display() 調用,其實調用的核心非常簡單且高效,她就是“include”,這樣就意味著您的視圖文件和控制器都在一個對象內部!那么...... 他們可以共享成員變量,即 $this->變量名稱! **演示代碼:** ~~~ //控制器代碼?: <?php class?indexController?extends?grace{ ????public?function?index(){ ????????$this->webInfo?=?array( ???????????'phpGrace', ????????????'phpGrace,?PHP框架', ????????????'phpGrace?輕快的實力派!' ????????); ????????$this->name?=?'grace'; ????????//變量可以來自數據庫查詢哦?^_^ ????????$this->data?=?array( ????????????array('name'?=>?'張三',?age?=>?18), ????????????array('name'?=>?'李四',?age?=>?20), ????????); ????} } //視圖文件?index_index.php?代碼 <html> <head> <title><?php?echo?$this->webInfo[0];?></title> </head> <body> <h1><?php?echo?$this->name;?></h1> <ul> ????<?php?foreach($this->data?as?$rows){?> ????<li><?php?echo?$rows['name'];?>?:?<?php?echo?$rows['age'];?></li> ????<?php?}?> </ul> </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>

                              哎呀哎呀视频在线观看