Authored by hf

do init template path

Showing 44 changed files with 126 additions and 22 deletions
... ... @@ -74,7 +74,7 @@ class TemplateLayout implements View_Interface
$config = Application::app()->getConfig()->get('application');
$tplExt = $config->template->ext;
$viewPath = $config->template->path;
$viewName = $viewPath . '/' . $request->module . '/' . $request->controller . '/' . $tpl . $tplExt;
$viewName = $viewPath . '/' . strtolower($request->module) . '/' . strtolower($request->controller) . '/' . $tpl . $tplExt;
// 判断视图模板文件是否存在, 不存在则直接返回空
if (!file_exists($viewName)) {
return '';
... ...
E:\nginx\instsrv.exe NGINX E:\nginx\srvany.exe
regedit /s E:\nginx\nginx.reg
\ No newline at end of file
D:\nginx\instsrv.exe NGINX D:\nginx\srvany.exe
regedit /s D:\nginx\nginx.reg
\ No newline at end of file
... ...
{{>layout/header}}
This is a test {{test}}
频道选择
{{>layout/footer}}
\ No newline at end of file
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
use Action\AbstractAction;
/**
* 男生频道
* 男生首页
*/
class BoysController extends AbstractAction
{
... ...
<?php
/**
* @name ErrorController
* @desc 错误控制器, 在发生未捕获的异常时刻被调用
... ... @@ -11,20 +10,12 @@ use Action\AbstractAction;
class ErrorController extends AbstractAction
{
public function errorAction($exception)
{
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
exit();
}
public function notFoundAction()
public function indexAction($exception)
{
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
exit();
$this->_view->render('error');
}
}
... ...
<?php
use Action\AbstractAction;
/**
* 女生频道
* 女生首页
*/
class GirlsController extends AbstractAction
{
... ...
<?php
use Action\AbstractAction;
/**
* 会员账单
* 逛首页
*/
class IndexController extends AbstractAction
class LifestyleController extends AbstractAction
{
public function indexAction()
{
echo 'hello world';
echo 'guang';
}
}
\ No newline at end of file
... ...
<?php
use Action\AbstractAction;
/**
* 潮童频道
* 潮童首页
*/
class KidsController extends AbstractAction
{
... ...
<?php
use Action\AbstractAction;
/**
* 创意生活频道
* 创意生活首页
*/
class LifestyleController extends AbstractAction
{
public function indexAction()
{
echo 'lifestyle';
echo 'life style';
}
}
\ No newline at end of file
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
... ...