嗨,我是 zend framework2.2.0 的新手。我想创建一个具有多个控制器的模块我已经从 github 下载了“Album”模块并且它工作正常现在我想在其中添加更多控制器我已经在模块中显示了我的文件夹结构
module/
Album/
config/
module.config.php
src/
Album/
Controller/
AlbumController.php
UserController.php
Form/
AlbumForm.php
UserForm.php
Model/
AlbumTable.php
Album.php
UserTable.php
User.php
view/
album/
album/
index.phtml
user/
index.phtml
我还更改了文件中的所有命名空间
命名空间专辑\控制器;
类 UserController 扩展 \Zend\Mvc\Controller\AbstractActionController
和一些 indexAction 方法女巫返回一个新的 \Zend\View\Model\ViewModel();
然后你可以创建你的视图文件
Album/view/Album/user/index.phtml 我做了上述更改。“Album/Module.php”文件中是否需要任何更改?你能告诉我通过哪个链接我可以看到用户列表吗?
我厌倦了这个错误,帮助我摆脱它