Zend framework url帮助程序出错,$this->;url(array(),';home';);生成这样的链接http///home

Zend framework url帮助程序出错,$this->;url(array(),';home';);生成这样的链接http///home,zend-framework,url-helper,Zend Framework,Url Helper,url帮助程序出错,$this->url(数组(),'home');生成这样的链接http///home 嗨 我在application.ini文件中创建了如下自定义路由: resources.router.routes.home.route=/home resources.router.routes.home.defaults.module=default resources.router.routes.home.defaults.controller=索引 resources.router.

url帮助程序出错,$this->url(数组(),'home');生成这样的链接http///home

我在application.ini文件中创建了如下自定义路由:

resources.router.routes.home.route=/home
resources.router.routes.home.defaults.module=default
resources.router.routes.home.defaults.controller=索引
resources.router.routes.home.defaults.action=索引

在我的主布局中,我想像这样写一个链接到我的主页

<a href="<?php echo $this->url(array(), 'home'); ?>">Home</a>

但是我得到了生成的html文件,
http///home

谁能帮我以这种形式获取url
/home
,或
http//example.com/home
,?
谢谢


如果只使用resources.router.routes.home.route=home(不带斜杠),会发生什么?baseUrl()设置是什么?没关系,我的资源定义有错误
$this->baseUrl('/home');