数据库链接错误/无法找到数据库 : Too many connections
- /alidata/www/project/duoduoyin-news/php/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.
*
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/spFunctions.php on line 153
148.
}
149.
if(FALSE != $has_define){
150.
$argString = ;$comma = ;
151.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = , ;}
152.
if($cache_inst) {
153.
154.
eval("\$GLOBALS[G_SP][inst_class][\$class_name] = new \$class_name($argString);");
return $GLOBALS[G_SP]["inst_class"][$class_name];
155.
}else {
156.
eval("\$tmpCls = new \$class_name($argString);");
157.
return $tmpCls;
158.
}
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/Core/spModel.php on line 58
53.
if(in_array($this->tbl_name, $GLOBALS[G_SP][controller_other_db])){
54.
$this->_db = spClass(db_.$GLOBALS[G_SP][db_other][driver], array(0=>$GLOBALS[G_SP][db_other]), $GLOBALS[G_SP][db_driver_path], $forceInst);
55.
}elseif (in_array($this->tbl_name, $GLOBALS[G_SP][controller_e4_db])) {
56.
$this->_db = spClass(db_.$GLOBALS[G_SP][db_e4][driver], array(0=>$GLOBALS[G_SP][db_e4]), $GLOBALS[G_SP][db_driver_path], $forceInst);
57.
}else{
58.
59.
$this->_db = spClass(db_.$GLOBALS[G_SP][db][driver], array(0=>$GLOBALS[G_SP][db]), $GLOBALS[G_SP][db_driver_path], $forceInst);
}
60.
}
61.
62.
/**
63.
* 从数据表中查找一条记录
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/spFunctions.php on line 153
148.
}
149.
if(FALSE != $has_define){
150.
$argString = ;$comma = ;
151.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = , ;}
152.
if($cache_inst) {
153.
154.
eval("\$GLOBALS[G_SP][inst_class][\$class_name] = new \$class_name($argString);");
return $GLOBALS[G_SP]["inst_class"][$class_name];
155.
}else {
156.
eval("\$tmpCls = new \$class_name($argString);");
157.
return $tmpCls;
158.
}
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/Extensions/spAcl.php on line 29
24.
* @param boole $jump 是否没登录跳走?
25.
* @return boole or exit
26.
*/
27.
public function subCheck($control, $action, $jump = true){
28.
//控制器ID
29.
30.
$controlId = spClass(m_acl)->spCache()->find(array(visit => $control, pid => 0), null, id);
//若是权限库里不存在此控制器则有权限
31.
if(empty($controlId)){
32.
return true;
33.
}
34.
//没有登录或者超时的提醒
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/Extensions/spAcl.php on line 16
11.
* @global type $__action 对应的动作
12.
* @return type none
13.
*/
14.
public function check(){
15.
GLOBAL $__controller, $__action;
16.
17.
if(!$this->subCheck($__controller, $__action))//没有权限的提醒
$this->def_prompt();
18.
}
19.
20.
/**
21.
* 检测有无权限的过程(黑名单模式:数据库不设置权限的就是有权限,设置的需权限检测)
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/spFunctions.php on line 190
185.
*/
186.
function spLaunch($configname, $launchargs = null, $returns = FALSE ){
187.
if( isset($GLOBALS[G_SP][launch][$configname]) && is_array($GLOBALS[G_SP][launch][$configname]) ){
188.
foreach( $GLOBALS[G_SP][launch][$configname] as $launch ){
189.
if( is_array($launch) ){
190.
191.
$reval = spClass($launch[0])->{$launch[1]}($launchargs);
}else{
192.
$reval = call_user_func_array($launch, $launchargs);
193.
}
194.
if( TRUE == $returns )return $reval;
195.
}
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/spFunctions.php on line 12
7.
* spRun 实行用户代码
8.
*/
9.
function spRun(){
10.
GLOBAL $__controller, $__action;
11.
// 对路由进行自动实行相关操作
12.
13.
spLaunch("router_prefilter");
// 对将要访问的控制器类进行实例化
14.
$handle_controller = spClass($__controller, null, $GLOBALS[G_SP]["controller_path"]./.$__controller.".php");
15.
// 调用控制器出错将调用路由错误处理函数
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
header(location: /main/notfound.$_SERVER[REQUEST_URI]..html);exit();//用于调试显示哪个请求不存在
- /alidata/www/project/duoduoyin-news/php/index.php on line 3
1.
<?php
2.
require(SP_PATH."/SpeedPHP.php");
3.
spRun();
- /alidata/www/project/duoduoyin-news/web/pc/info/index.php on line 3
1.
<?php
2.
$spConfig = require(dirname(dirname(dirname(__DIR__))) . /config/config-pc-info.php);
3.
require(BASE_PATH."/index.php");