数据库链接错误 : Too many connections
- /home/iltawcom/public_html/SpeedPHP/Drivers/mysql.php on line 78
73.
* @param dbConfig 数据库配置
74.
*/
75.
public function __construct($dbConfig)
76.
{
77.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' : 'mysql_connect';
78.
79.
$this->conn = $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['login'], $dbConfig['password']) or spError("数据库链接错误 : " . mysql_error());
mysql_select_db($dbConfig['database'], $this->conn) or spError("无法找到数据库,请确认数据库名称正确!");
80.
$this->exec("SET NAMES UTF8");
81.
}
82.
83.
/**
- /home/iltawcom/public_html/SpeedPHP/spFunctions.php on line 154
149.
if( TRUE == import($class_name.'.php')){
150.
$has_define = TRUE;
151.
}
152.
}
153.
if(FALSE != $has_define){
154.
155.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
156.
}
157.
spError($class_name."类定义不存在,请检查。");
158.
}
159.
- /home/iltawcom/public_html/SpeedPHP/Core/spModel.php on line 52
47.
{
48.
if( null == $this->tbl_name )$this->tbl_name = $GLOBALS['G_SP']['db']['prefix'] . $this->table;
49.
if( '' == $GLOBALS['G_SP']['db_driver_path'] ){
50.
$GLOBALS['G_SP']['db_driver_path'] = $GLOBALS['G_SP']['sp_drivers_path'].'/'.$GLOBALS['G_SP']['db']['driver'].'.php';
51.
}
52.
53.
$this->_db = spClass('db_'.$GLOBALS['G_SP']['db']['driver'], $GLOBALS['G_SP']['db'], $GLOBALS['G_SP']['db_driver_path']);
}
54.
55.
56.
/**
57.
* 获取数据库版本
- /home/iltawcom/public_html/SpeedPHP/spFunctions.php on line 154
149.
if( TRUE == import($class_name.'.php')){
150.
$has_define = TRUE;
151.
}
152.
}
153.
if(FALSE != $has_define){
154.
155.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
156.
}
157.
spError($class_name."类定义不存在,请检查。");
158.
}
159.
- /home/iltawcom/public_html/wap/controller/animals.php on line 255
250.
}
251.
252.
function detail(){
253.
$postdate = $this->spArgs();
254.
$id = $postdate['id'];
255.
256.
$animal = spClass('animal');
$animal_rs = $animal->findByPk($id);
257.
if($animal_rs['aid'] && $animal_rs['status'] == 1){
258.
$animal_photo = spClass('animal_photo');
259.
$this->photo_rs = $animal_photo->findAll(array('aid'=>$id), 'showorder Asc', '*', NULL, 30);
260.
$animal_detail = spClass('animal_detail');
- /home/iltawcom/public_html/SpeedPHP/spFunctions.php on line 27
22.
23.
//执行before_display注入函数
24.
spInject('before_display', array($handle_controller) );
25.
26.
// 路由并执行用户代码
27.
28.
$handle_controller->$__action();
29.
// 控制器程序运行完毕,进行模板的自动输出
30.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
31.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
32.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
- /home/iltawcom/public_html/wap/index.php on line 67
62.
63.
//if($_SERVER['HTTP_HOST'] == 'www.iltaw.com'){
64.
// header("Location: http://m.iltaw.com");
65.
//}
66.
67.
68.
spRun();
?>