ZF2: Zend Framework 2 Full URL including host name

后端 未结 4 807
一生所求
一生所求 2021-02-02 00:32

In my view I need to draw full URL. Like this:

http://hostename.com/default/url

When I try to use $this->url(\'default\', array(1,2,3)

4条回答
  •  旧时难觅i
    2021-02-02 00:40

    There is a Zend\View\Helper\ServerUrl to create full url in zend view. Try below code in your view template.

    serverUrl()?>
    

提交回复
热议问题