Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applicaion.modules配置不生效 #86

Closed
leo108 opened this issue Feb 23, 2014 · 3 comments
Closed

applicaion.modules配置不生效 #86

leo108 opened this issue Feb 23, 2014 · 3 comments

Comments

@leo108
Copy link

leo108 commented Feb 23, 2014

yaf版本2.2.9

$conf =  array(
    'application'=> array(
        'directory'=> APP_PATH.'/application/',
        'modules' => 'Index,Test',
    ),
);
$app  = new Yaf\Application($conf);
var_dump($app->getModules());

结果输出还是array(1) { [0]=> string(5) "Index" }

@leo108
Copy link
Author

leo108 commented Feb 23, 2014

并且不管使用哪一种路由,总是路由到默认模块,比如在bootstrap.php文件中加入:

$route = new Yaf\Route\Simple('m', 'c', 'a');
$router->addRoute("name", $route);

然后url是index.php?m=test&c=index&a=index,但是显示的却是默认模块的IndexController。

文件夹目录如下:

application
├── Bootstrap.php
├── controllers
│   ├── Error.php
│   └── Index.php
├── modules
│   └── Test
│       ├── Bootstrap.php
│       └── controllers
│           └── index.php
.....其他文件夹

@leo108
Copy link
Author

leo108 commented Feb 23, 2014

操作失误,与YAF无关,close

@leo108 leo108 closed this as completed Feb 23, 2014
@JianfuLi
Copy link

我也遇到一样的问题,你是如何解决的,是哪里配置不对吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants