|
PHP复制代码 <?php
/**
* @name [控制器扩展]
* @author [FatrBaby]
* @created [2012-7-9]
* @mail [mrfatr@gmail.com]
*/
class FR_Controller extends CI_Controller {
function __construct (){
parent ::__construct ();
}
/*扩展视图调用*/
function view ($view,$vars = array(),$return = False){
$this->load->view($view,$vars,$return);
}
/*扩展错误提示*/
function error ($errors=array()){
$data['error'] = $errors;
$data['back'] = $_SERVER["HTTP_REFERER"];
$this->view('public/error.htm',$data);
exit();
}
}
?>
复制代码
这里的error方法不能调用到视图,这是为什么?求解……
|
|