2010-10-01 15 views
0

我开始在自举程序中获得大量路由,所以我决定将它们移到配置文件中进行清理。我很确定我的语法正确,但由于某种原因,我的路线现在无法使用。下面是我的配置文件:这些来自配置文件的Zend Framework路由有什么问题?

<config> 
    <routes> 
     <indextracking type="Zend_Controller_Router_Route"> 
      <route>crid/:crid</route> 
      <defaults> 
       <controller>index</controller> 
       <action>index</action> 
      </defaults> 
     </indextracking> 
     <internetaccess type="Zend_Controller_Router_Route"> 
      <route>internet-access</route> 
      <defaults> 
       <controller>quote</controller> 
       <action>index</action> 
       <pluginType>1</pluginType> 
      </defaults> 
     </internetaccess> 
    </routes> 
</config> 

,这里是我的代码从我的引导:

protected function _initRoutes() 
{ 
    $router = Zend_Controller_Front::getInstance()->getRouter(); 
    $router->addConfig(new Zend_Config_Xml(APPLICATION_PATH . '/configs/routes.xml')); 
    // More routes below. I only moved over the first two to try it out. 
} 

无论是从间配置正在注册的路线。我在这里做错了什么?

回答

0

没关系。我所要做的只是删除“config”标签,现在它似乎正在工作。