Zend 框架(1.7.5):如何更改控制器目录 [英] Zend framework (1.7.5): how to change controller directory

查看:27
本文介绍了Zend 框架(1.7.5):如何更改控制器目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Zend Framework 我想使用存储在非默认目录中的控制器.

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

我想要实现的是,如果请求的路径以 admin/controllers/admin 开头,使用 layout/admin 和 views/admin 等.

What I'm trying to achieve is that if the requested path begins with admin/ controllers/admin is used, with layout/admin and views/admin etc.

我将如何以一种相当优雅的方式实现这一目标?

How would I go about achieving this in a reasonably graceful manner?

推荐答案

您可以使用模块目录结构.创建目录结构

You could use the module directory structure. Create the directory structure

application
  default
    controllers
    views
    models
  admin
    controllers
    views
    models

有关更多信息,请查看有关使用常规模块化目录的文档结构

For more info check out the docs on Using a Conventional Modular Directory Structure

这篇关于Zend 框架(1.7.5):如何更改控制器目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆