I have recently started with php and I am trying to securely connect MySQL database but I keep getting this error:
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/fongatse/LAMP/include/class-mysql.php on line 15 on line 15 starting by $this->handler
public function __construct(){
$this->handler = new mysqli($this->host, $this->user, $this->pass, this->database);
$error = $this->handler->connect_error;
if (isset($error)) {
Debug::error("MySQL error: ". $error, true) ;
}
$this->handler->set_charset("utf8");
}
Aucun commentaire:
Enregistrer un commentaire