更新核心

This commit is contained in:
thinkphp
2015-03-27 15:38:46 +08:00
parent 9df7ecab9a
commit 7bb958636e
10 changed files with 100 additions and 77 deletions

View File

@@ -26,8 +26,9 @@ class Controller {
$this->view = new View();
//控制器初始化
if(method_exists($this, '_initialize'))
if(method_exists($this, '_initialize')){
$this->_initialize();
}
}
/**
@@ -114,6 +115,18 @@ class Controller {
exit($data);
}
/**
* Action跳转(URL重定向 支持指定模块和延时跳转
* @access protected
* @param string $url 跳转的URL表达式
* @param array $params 其它URL参数
* @return void
*/
protected function redirect($url,$params=[]) {
$url = U($url,$params);
header('Location: ' . $url);
}
/**
* 操作错误跳转的快捷方法
* @access protected