继承CDbConnection, 覆盖 init()方法

在 parent::init() 之前设置 $this->setAttribute(PDO::ATTR_TIMEOUT, $this->timeout); 即可。

相关文章: