数据库链接错误/无法找到数据库 : 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/spFunctions.php on line 1219
1214.
/**
1215.
* 获得资讯数据
1216.
*/
1217.
function getNews($product=)
1218.
{
1219.
1220.
return spClass(m_news)->getNewsData($product);
}
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/Core/spController.php on line 297
292.
case baike:
293.
$newContent = getBaike();
294.
break;
295.
case news:
296.
$product = $paramArr[1]?:;
297.
298.
$newContent = getNews($product);
break;
299.
}
300.
pq("#".$id)->html($newContent);
301.
}
302.
$resHtml = $doc->htmlOuter();
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/Core/spController.php on line 355
350.
}
351.
// $mobankuKey = in_array(mobanku, $pathArr)&&in_array(key, $pathArr);
352.
353.
if((time() - filemtime($htmlPath) < $updateTime) || $mustUpdate){ //文件更新时间在5天内输出静态,否则重新更新静态,模板库key、百科详情不更新
354.
$htmlContent = file_get_contents($htmlPath);
355.
356.
$htmlContent = $this->replaceHtml($htmlContent);
if($htmlContent){
357.
echo $htmlContent;
358.
exit;
359.
}
360.
}
- /alidata/www/project/duoduoyin-news/php/controller/main.php on line 60
55.
//列表页转发
56.
if ($hostArr[0] == www && empty($query)) {
57.
$url = INFO_URL.$product./;
58.
$this->jump($url);
59.
}
60.
61.
$this->checkHtml(); //检查静态文件
$this->productName = $productName = getProduct($product);
62.
63.
$this->type = $type = strtolower($this->spArgs(type, null));
64.
//查询所有产品类型
65.
$allProductData = spClass(m_product)->spCache()->getAllProduct(null, name);
- /alidata/www/project/duoduoyin-news/php/SpeedPHP/spFunctions.php on line 23
18.
//header(location: /main/notfound.html);exit();
19.
eval($GLOBALS[G_SP]["dispatcher_error"]);
20.
exit;
21.
}
22.
// 路由并实行用户代码
23.
24.
$handle_controller->$__action();
// 控制器程序运行完毕,进行模板的自动输出
25.
if(FALSE != $GLOBALS[G_SP][view][auto_display]){
26.
$__tplname = $__controller.$GLOBALS[G_SP][view][auto_display_sep].
27.
$__action.$GLOBALS[G_SP][view][auto_display_suffix]; // 拼装模板路径
28.
$handle_controller->auto_display($__tplname);
- /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");