我使用新的Zend Framework 2進行測試,並且當我嘗試使用baseUrl視圖幫助器時發現問題,在我的phtml視圖中調用$this->baseUrl()
時出現以下錯誤文件;baseUrl視圖幫手不工作ZendFramework 2
調試錯誤:
C:\Zend\ZendServer\share\ZendFramework2\library\Zend\ServiceManager\ServiceManager.php line 424 - Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for baseUrl' in C:\Zend\ZendServer\share\ZendFramework2\library\Zend\ServiceManager\ServiceManager.php:424
非常感謝,我沒有意識到它現在是basePath – Eric