<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 功能強大 支持多語言、二開方便! 廣告
                # 模板中變量與賦值 >[warning] 注:請將php.ini中短標簽設置為開啟。 short_open_tag = On #### 控制器示例代碼:/app/Controller/IndexController.php 聲明$name變量,并作為display()參數傳遞進去。 ~~~ class IndexController extends Controller{ public function index(){ $name = '張三'; $this->display($name); } } ~~~ #### 模板示例代碼:/app/View/Index/index.php 在模板中使用PHP輸出變量方式輸出$name ~~~ <!doctype html> <html> <head> <meta charset="utf-8"> <title>MAGPHP框架</title> </head> <body> 用戶<?=$name?>您好,歡迎使用MAGPHP微框架! </body> </html> ~~~ <br/><hr/><br/><br/> #### 再例如: 定義了一個$data的數組,里面有第4條score的值是一個數組。最后將$data作為參數傳入給display()方法。 ~~~ class IndexController extends Controller{ public function index(){ $data['name'] = '張三'; $data['age'] = 25; $data['sex'] = '男'; $this->display($data); } } ~~~ 在模板文件中調用輸出如下: ~~~ <!doctype html> <html> <head> <meta charset="utf-8"> <title>MAGPHP框架</title> </head> <body> 姓名:<?=$data['name']?><br/> 年齡:<?=$data['age']?><br/> 性別:<?=$data['sex']?> </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>

                              哎呀哎呀视频在线观看