简体   繁体   中英

problem with function getBaseUrl() in zend framework

i have BaseUrl class in this path application\\views\\helpers

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

but in my views when i use

echo $this->baseUrl(); 

its null ;

someone could help ?

thanks

There are already a View-Helper for BaseURL : class Zend_View_Helper_BaseUrl extends Zend_View_Helper_Abstract

I think you have problem with the default ; try to rename your Zend_View_Helper_BaseUrl or try to use the default one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM