&符 php中引用

public function __construct(){
$this->log('initialize paiguan interface');


$this->CI = &get_instance();
$this->input = &$this->CI->input;
$this->load = &$this->CI->load;
$this->CI->load->library('socketclient');
$this->CI->load->library('xml');
$this->socket = &$this->CI->socketclient;
$this->xml = &$this->CI->xml;
$this->log('initialize MIDDB');
$this->middb = $this->CI->load->database('middb',TRUE);
if(!$this->middb){
$this->error('load middb database error');
}

}



&的作用为传引用

猜你喜欢

转载自blog.csdn.net/ifyouwanttogo/article/details/80615187