$this->Settings = array("host" => $host , "user" => $user , "pass" => $pass);
$this->db = $db;
$this->Settings["name"] = ereg_replace ("_", "", $this->db);
$this->init();
我有一个应用程序,从php 5.2迁移到php 5.3后无法工作。php 5.3 ereg_replace到preg_replace
即使我改变了上面
$this->aSettings["name"] = preg_replace("/_/", "", $this->db);
它仍然没有从数据库获取的设置ereg_replace线。
如果问题是未从数据库中检索到该值,那么问题出在您的'$ db'变量中。尝试检查它的值:'var_dump($ db)' – pankar