Zend framework (1.7.5): how to change controller directory

前端 未结 2 1048
后悔当初
后悔当初 2021-01-20 00:58

Using Zend Framework I want to use controllers stored in a directory which is not default.

What I\'m trying to achieve is that if the requested path begins with admi

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-20 01:16

    $front = Zend_Controller_Front::getInstance();
    $front->setControllerDirectory(...path...);
    

    OR multiple paths

    $front = Zend_Controller_Front::getInstance();
    $front->setControllerDirectory(array(
        'default' => '/path/to/application/controllers',
        'blog'    => '/path/to/application/blog/controllers'
    ));
    

    http://framework.zend.com/manual/en/zend.controller.front.html

提交回复
热议问题