数据库链接错误 : Connection timed out
- /webroot/yst.tomomall.com/SpeedPHP/Drivers/mysql.php on line 92
87.
* @param dbConfig 数据库配置
88.
*/
89.
public function __construct($dbConfig)
90.
{
91.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' : 'mysql_connect';
92.
93.
$this->conn = $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['login'], $dbConfig['password']) or spError("数据库链接错误 : " . mysql_error());
mysql_select_db($dbConfig['database'], $this->conn) or spError("无法找到数据库,请确认数据库名称正确!");
94.
$this->exec("SET NAMES UTF8");
95.
}
96.
/**
97.
* 对特殊字符进行过滤
- /webroot/yst.tomomall.com/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.
- /webroot/yst.tomomall.com/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.
*
- /webroot/yst.tomomall.com/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.
- /webroot/yst.tomomall.com/SpeedPHP/spFunctions.php on line 308
303.
* 表全名是默认值,db_spdb_full_tblname = true,tbl_name值将是(表前缀 + 表名称)
304.
* 表名称,db_spdb_full_tblname = false,这时候框架将使用db配置中的表前缀prefix。
305.
* @param pk 主键(可选),忽略主键的时候,将获取表第一个字段作为主键(通常都是)
306.
*/
307.
function spDB($tbl_name, $pk = null){
308.
309.
$modelObj = spClass("spModel");
$modelObj->tbl_name = (TRUE == $GLOBALS['G_SP']["db_spdb_full_tblname"]) ? $tbl_name : $GLOBALS['G_SP']['db']['prefix'] . $tbl_name;
310.
if( !$pk ){ // 主键通过数据库驱动getTable来获取
311.
@list($pk) = $modelObj->_db->getTable($modelObj->tbl_name);$pk = $pk['Field'];
312.
}
313.
$modelObj->pk = $pk;
- /webroot/yst.tomomall.com/controller/main.php on line 1690
1685.
return $templ;
1686.
}
1687.
1688.
function getCommonData($shop_id)
1689.
{
1690.
1691.
$shop = spDB('yst_site_setting')->find(array('shop_id' => $shop_id), '', 'name,pic_logo,pic_prize,pic_subject_1,pic_subject_2,pic_subject_3,introduction,site_url');
//logo
1692.
$logo = $shop['pic_logo'];
1693.
1694.
//主办方官网
1695.
$site_url = $shop['site_url'];
- /webroot/yst.tomomall.com/controller/main.php on line 1052
1047.
1048.
$this->spArgs('contype') ? $contype = $this->spArgs('contype') : $contype = 'marrow';
1049.
1050.
$templ = $this->getTempl($shop_id);
1051.
$templ_path = "templates/$templ/photolist.html";
1052.
1053.
$common_data = $this->getCommonData($shop_id);
1054.
//作品分类
1055.
$types = spDB('yst_photo_type')->findAll(array('shop_id' => $shop_id), 'sort_order');
1056.
1057.
- /webroot/yst.tomomall.com/SpeedPHP/spFunctions.php on line 21
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
20.
// 路由并执行用户代码
21.
22.
$handle_controller->$__action();
// 控制器程序运行完毕,进行模板的自动输出
23.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
24.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
25.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
26.
$handle_controller->auto_display($__tplname);
- /webroot/yst.tomomall.com/index.php on line 21
16.
require APP_PATH . '/controller/controller.php';
17.
require APP_PATH . '/controller/charge.php';
18.
//检测站点是否已经过期
19.
$login = new charge();
20.
21.
spRun();