<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國際加速解決方案。 廣告
                路徑:`/module/Application/src/Application/controller/IndexController.php` 代碼如下: ~~~ namespace Application\Controller; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; class IndexController extends AbstractActionController{ public function indexAction(){ echo "hello world"; exit; } } ~~~ 代碼說明: namespace Application\Controller 指定命名空間 use Zend\Mvc\Controller\AbstractActionController | use Zend\View\Model\ViewModel 導入相關類庫 class IndexController extends AbstractActionController 定義 IndexController 類庫,同時此類必需繼承 AbstractActionController 類,這是ZF2 的硬性要求,除非你重寫此類的實現。 public function indexAction(){} 控制器的一個響應動作,其中indexAction 這個名稱為ZF默認動作 echo "hello world" 在屏幕上打印出 hello world 到此一個基本的控制器類就已經編寫完成,但是不是現在就可以通過 http://localhost/ 就可以訪問控制器,并可以看到屏幕上的hello world 了呢?答案當然是否定的。如果這是ZF1的話,就添加完這樣一個控制器后應該是可以訪問的了。但此處使用的是ZF2框架,所以要想通過 http://localhost/ 訪問并在屏幕上打印出 hello world 來還需要添加多個文件來共同實現;這也是為什么ZF2比ZF1的使用要更為復雜,也是ZF2比ZF1更加強大、靈活的原因所在。
                  <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>

                              哎呀哎呀视频在线观看