数据库链接错误/无法找到数据库 : Too many connections
- D:\wwwroot\szdishuo\wwwroot\SpeedPHP\Drivers\mysqli.php on line 94
89.
public function __construct($dbConfig)
90.
{
91.
if(!function_exists('mysqli_connect'))spError('PHP环境未安装MySQLi函数库!');
92.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysqli_pconnect' : 'mysqli_connect';
93.
$this->conn = $linkfunction($dbConfig['host'], $dbConfig['login'], $dbConfig['password'], $dbConfig['database'], $dbConfig['port']);
94.
95.
if(mysqli_connect_errno())spError('数据库链接错误/无法找到数据库 : '. mysqli_connect_error());
$this->exec("SET NAMES UTF8");
96.
}
97.
/**
98.
* 对特殊字符进行过滤
99.
*
- D:\wwwroot\szdishuo\wwwroot\SpeedPHP\spFunctions.php on line 149
144.
}
145.
}
146.
if(FALSE != $has_define){
147.
$argString = '';$comma = '';
148.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', '; }
149.
150.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
151.
}
152.
spError($class_name."类定义不存在,请检查。");
153.
}
154.
- D:\wwwroot\szdishuo\wwwroot\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'], array(0=>$GLOBALS['G_SP']['db']), $GLOBALS['G_SP']['db_driver_path']);
}
54.
55.
/**
56.
* 从数据表中查找一条记录
57.
*
- D:\wwwroot\szdishuo\wwwroot\SpeedPHP\spFunctions.php on line 149
144.
}
145.
}
146.
if(FALSE != $has_define){
147.
$argString = '';$comma = '';
148.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', '; }
149.
150.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
151.
}
152.
spError($class_name."类定义不存在,请检查。");
153.
}
154.
- D:\wwwroot\szdishuo\wwwroot\modules\index\general.php on line 28
23.
* 覆盖控制器构造函数,进行相关的赋值操作
24.
*/
25.
function __construct()
26.
{
27.
parent::__construct();
28.
29.
$this->languages_obj = spClass('languagesModel');
$languages = $this->languages_obj->List_languages();
30.
$this->languages = $languages;
31.
$this->lang = $languages;
32.
33.
//语言的选择
- D:\wwwroot\szdishuo\wwwroot\modules\index\main.php on line 16
11.
*/
12.
class main extends general
13.
{
14.
function __construct()
15.
{
16.
17.
parent::__construct();
}
18.
function index()
19.
{
20.
$conditions = array('categories_id' => 7,'status'=>1);
21.
$bannerlist=spClass('newsModel')->findAll($conditions,'sort desc,id desc',null,'0,5');
- D:\wwwroot\szdishuo\wwwroot\SpeedPHP\spFunctions.php on line 149
144.
}
145.
}
146.
if(FALSE != $has_define){
147.
$argString = '';$comma = '';
148.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', '; }
149.
150.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
151.
}
152.
spError($class_name."类定义不存在,请检查。");
153.
}
154.
- D:\wwwroot\szdishuo\wwwroot\SpeedPHP\spFunctions.php on line 14
9.
function spRun(){
10.
GLOBAL $__controller, $__action;
11.
// 对路由进行自动执行相关操作
12.
spLaunch("router_prefilter");
13.
// 对将要访问的控制器类进行实例化
14.
15.
$handle_controller = spClass($__controller, null, $GLOBALS['G_SP']["controller_path"].'/'.$__controller.".php");
// 调用控制器出错将调用路由错误处理函数
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
- D:\wwwroot\szdishuo\wwwroot\index.php on line 17
12.
// 当前模块附加的配置
13.
$spConfig['controller_path'] = APP_PATH . '/modules/' . basename(__file__,".php");
14.
require (SP_PATH . "/SpeedPHP.php");
15.
// 载入用户自定义的函数文件
16.
require(APP_PATH.'/lib/functions.php');
17.
spRun();