Best practice to create absolute URLs with Zend framework?

前端 未结 5 1904
南笙
南笙 2021-02-01 23:26

Is there a best practice for creating absolute URLs using the Zend framework? I wonder if there is some helper or if this would just be concatenating the scheme, host, etc. from

5条回答
  •  忘掉有多难
    2021-02-02 00:07

    Without mvc

    echo $this->serverUrl() . $this->baseUrl('cass/base.css');
    

    or with mvc

    echo  $this->serverUrl() . $this->url(array('controller'=>'index','action'=>'index'),null,true);
    

提交回复
热议问题