Problem with getBaseUrl () function in zend framework

I have a BaseUrl class on this path application\views\helpers

 class Zend_View_Helper_BaseUrl { function baseUrl () { $fc = Zend_Controller_Front::getInstance(); return $fc->getBaseUrl(); } } 

but in my mind when I use

 echo $this->baseUrl(); 

its null ;

can someone help?

thanks

+4
source share
1 answer

BaseURL already has a View-Helper: class Zend_View_Helper_BaseUrl extends Zend_View_Helper_Abstract

I think you have problems with the default value; try renaming your Zend_View_Helper_BaseUrl or try using it by default.

+1
source

Source: https://habr.com/ru/post/1343425/


All Articles