我正在寻找mysql_real_escape_string的替代方案来解决这个错误。在php 5.4中它完美地工作,但在php 5.5中不再有效。
$this->mysqli = new mysqli($this->host, $this->user, $this->pass, $this->name);
// in class user
public function __set($p_sProperty, $p_vValue)
{
switch($p_sProperty)
{
// this is marked as the error
case "Email":
$this->Email = **mysql_real_escape_string**($p_vValue);
break;
}
}
mysql_*
函数和mysqli_*
函数... - War10ckaddslashes
例如:addslashes("带有双引号的字符串 ")
- anlijudavid