방금 웹 서버를 PHP 5.4로 업그레이드했고 mysqli에서 확장 된 데이터베이스 클래스를 사용하는 사이트에 오류가 발생했습니다.맞춤 mysqli 클래스에 PHP 5.4에서 오류가 있습니까?
Strict Standards: Declaration of yamiko_mysqli::connect() should be compatible with mysqli::connect($host = NULL, $user = NULL, $password = NULL, $database = NULL, $port = NULL, $socket = NULL) in /home/markwe6/public_html/_php/yamiko_mysqli.php on line 109
과 클래스 :
class Yamiko_mysqli extends mysqli
{
public $host='localhost';
public $user='markwe6_yamiko';
public $pass='1chrysanthemum!';
public $db='markwe6_cp';
public $result=NULL;#stores most recent result
/*
*
*/
public function __construct($auto=TRUE)
{
if($auto)
{
return $this->connect();
}else
{
return TRUE;
}
}
/*
*
*/
public function connect($auto=TRUE, $user=NULL, $pass=NULL, $host=NULL, $db=NULL)
{
if($auto)
{
parent::__construct($this->host, $this->user, $this->pass, $this->db);
return $this->check_error();
}else
{
parent::__construct($host, $user, $pass, $db);
return $this->check_error();
}
}
/*
*
*/
public function query($sql)
{
$result=parent::query($sql);
if($this->check_error())
return FALSE;
$this->result=$result;
return $result;
}
/*
*
*/
private function check_error()
{
if($this->connect_error!=NULL)
{
$GLOBALS['yamiko']->set_error('yamiko_myslqi connection error: '.$this->connect_error);
return FALSE;
}elseif ($this->error!=NULL)
{
$GLOBALS['yamiko']->set_error('yamiko_myslqi error: '.$this->error);
return FALSE;
}
}
}#this is line 109....-_-
오류 메시지의 어느 부분을 이해하지 못합니까? - 또는 - 귀하의 질문은 무엇입니까? – hakre
나는 전혀 오류를 이해하지 못한다 ... 클래스가 잘 작동하고있다. – Yamiko