php - Zend Framework: how to use baseUrl as used in Code Igniter -


in zend framework, baseurl adds path '/user/local/path_tyo_file'. there function adds path 'http://mydomain.com/images/show.jpg' , base_url in code igniter does?

you can set baseurl in bootstrap.php file using initview method. way of doing general view work , keeping out of controllers.

protected function _initview() {     $view = new zend_view();      $view->gethelper('baseurl')->setbaseurl('http://mydomain.com');      $viewrenderer = zend_controller_action_helperbroker::getstatichelper(         'viewrenderer'     );      $viewrenderer->setview($view);      return $view; } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -