예제 #1
0
 public function index20Action()
 {
     echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>";
     $serverURL = new \Zend\View\Helper\ServerUrl();
     //getHost()
     echo $serverURL->getHost() . "<br />";
     //getPort()
     echo $serverURL->getPort() . "<br />";
     //getScheme()
     echo $serverURL->getScheme() . "<br />";
     $this->layout("layout/mvc");
     return false;
 }
예제 #2
0
 /** ServerUrl (only call in Controller ) */
 public function index20Action()
 {
     $serverUrl = new \Zend\View\Helper\ServerUrl();
     /** getHost */
     echo $serverUrl->getHost();
     /** getPort */
     echo $serverUrl->getPort();
     /** getScheme */
     echo $serverUrl->getScheme();
     $this->layout('layout/layout');
 }