Showing
44 changed files
with
126 additions
and
22 deletions
@@ -74,7 +74,7 @@ class TemplateLayout implements View_Interface | @@ -74,7 +74,7 @@ class TemplateLayout implements View_Interface | ||
74 | $config = Application::app()->getConfig()->get('application'); | 74 | $config = Application::app()->getConfig()->get('application'); |
75 | $tplExt = $config->template->ext; | 75 | $tplExt = $config->template->ext; |
76 | $viewPath = $config->template->path; | 76 | $viewPath = $config->template->path; |
77 | - $viewName = $viewPath . '/' . $request->module . '/' . $request->controller . '/' . $tpl . $tplExt; | 77 | + $viewName = $viewPath . '/' . strtolower($request->module) . '/' . strtolower($request->controller) . '/' . $tpl . $tplExt; |
78 | // 判断视图模板文件是否存在, 不存在则直接返回空 | 78 | // 判断视图模板文件是否存在, 不存在则直接返回空 |
79 | if (!file_exists($viewName)) { | 79 | if (!file_exists($viewName)) { |
80 | return ''; | 80 | return ''; |
script/nginx/html/readme.md
0 → 100644
script/nginx/logs/readme.md
0 → 100644
script/nginx/temp/readme.md
0 → 100644
1 | <?php | 1 | <?php |
2 | - | ||
3 | /** | 2 | /** |
4 | * @name ErrorController | 3 | * @name ErrorController |
5 | * @desc 错误控制器, 在发生未捕获的异常时刻被调用 | 4 | * @desc 错误控制器, 在发生未捕获的异常时刻被调用 |
@@ -11,20 +10,12 @@ use Action\AbstractAction; | @@ -11,20 +10,12 @@ use Action\AbstractAction; | ||
11 | class ErrorController extends AbstractAction | 10 | class ErrorController extends AbstractAction |
12 | { | 11 | { |
13 | 12 | ||
14 | - public function errorAction($exception) | ||
15 | - { | ||
16 | - header('HTTP/1.1 404 Not Found'); | ||
17 | - header('Status: 404 Not Found'); | ||
18 | - | ||
19 | - exit(); | ||
20 | - } | ||
21 | - | ||
22 | - public function notFoundAction() | 13 | + public function indexAction($exception) |
23 | { | 14 | { |
24 | header('HTTP/1.1 404 Not Found'); | 15 | header('HTTP/1.1 404 Not Found'); |
25 | header('Status: 404 Not Found'); | 16 | header('Status: 404 Not Found'); |
26 | 17 | ||
27 | - exit(); | 18 | + $this->_view->render('error'); |
28 | } | 19 | } |
29 | 20 | ||
30 | } | 21 | } |
1 | <?php | 1 | <?php |
2 | use Action\AbstractAction; | 2 | use Action\AbstractAction; |
3 | /** | 3 | /** |
4 | - * 会员账单 | 4 | + * 逛首页 |
5 | */ | 5 | */ |
6 | -class IndexController extends AbstractAction | 6 | +class LifestyleController extends AbstractAction |
7 | { | 7 | { |
8 | public function indexAction() | 8 | public function indexAction() |
9 | { | 9 | { |
10 | - echo 'hello world'; | 10 | + echo 'guang'; |
11 | } | 11 | } |
12 | } | 12 | } |
1 | <?php | 1 | <?php |
2 | use Action\AbstractAction; | 2 | use Action\AbstractAction; |
3 | /** | 3 | /** |
4 | - * 创意生活频道 | 4 | + * 创意生活首页 |
5 | */ | 5 | */ |
6 | class LifestyleController extends AbstractAction | 6 | class LifestyleController extends AbstractAction |
7 | { | 7 | { |
8 | public function indexAction() | 8 | public function indexAction() |
9 | { | 9 | { |
10 | - echo 'lifestyle'; | 10 | + echo 'life style'; |
11 | } | 11 | } |
12 | } | 12 | } |
-
Please register or login to post a comment