[1.5.4]修复 MySQL 数据库抽象层驱动加端口无效的bug
这个问题是俺在更改数据库服务器端口时发现滴,找到 \database\drivers\mysql\mysql_driver.php 将其中的相关函数替换成如下内容即可.(PS:可能其它的数据库驱动也有这个问题,不过俺暂时用不到,也就懒得去看了.)/**
* Non-persistent database connection
*
* @access private called by the base class
* @return resource
*/
function db_connect()
{
if ($this->port != "")
{
return @mysql_connect($this->hostname.":".$this->port, $this->username, $this->password, TRUE);
}
else
{
return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
}
}
// --------------------------------------------------------------------
/**
* Persistent database connection
*
* @access private called by the base class
* @return resource
*/
function db_pconnect()
{
if ($this->port != "")
{
return @mysql_pconnect($this->hostname.":".$this->port, $this->username, $this->password);
}
else
{
return @mysql_pconnect($this->hostname, $this->username, $this->password);
}
}
不错!以后是不是得弄一个 BUG 报告区啊?以后统一报告给官方!呵呵 这个建义8错哟:lol :lol :lol . 哈哈。。用pgsql吧。。换几个端口都没问题。。:lol
页:
[1]