数据库链接错误 : Can't connect to MySQL server on '121.207.227.153' (10060)
- F:\freehost\syzsyz\web\init\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.
* 对特殊字符进行过滤
- F:\freehost\syzsyz\web\init\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.
- F:\freehost\syzsyz\web\init\Core\spModel.php on line 57
52.
{
53.
if( null == $this->tbl_name )$this->tbl_name = $GLOBALS['G_SP']['db']['prefix'] . $this->table;
54.
if( '' == $GLOBALS['G_SP']['db_driver_path'] ){
55.
$GLOBALS['G_SP']['db_driver_path'] = $GLOBALS['G_SP']['sp_drivers_path'].'/'.$GLOBALS['G_SP']['db']['driver'].'.php';
56.
}
57.
58.
$this->_db = spClass('db_'.$GLOBALS['G_SP']['db']['driver'], array(0=>$GLOBALS['G_SP']['db']), $GLOBALS['G_SP']['db_driver_path']);
}
59.
60.
/**
61.
* 从数据表中查找一条记录
62.
*
- F:\freehost\syzsyz\web\init\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.
- F:\freehost\syzsyz\web\init\Extensions\spAccessCache.php on line 44
39.
$life_time = ( -1 == $life_time ) ? '300000000' : $life_time;
40.
return spClass($driverClass)->set($name, serialize($value), $life_time);
41.
}elseif('c' == $method){ // 清除数据
42.
return spClass($driverClass)->del($name);
43.
}else{ // 读数据
44.
45.
return unserialize(spClass($driverClass)->get($name));
}
46.
}
47.
}
48.
49.
/**
- F:\freehost\syzsyz\web\init\spFunctions.php on line 182
177.
*/
178.
function spLaunch($configname, $launchargs = null, $returns = FALSE ){
179.
if( isset($GLOBALS['G_SP']['launch'][$configname]) && is_array($GLOBALS['G_SP']['launch'][$configname]) ){
180.
foreach( $GLOBALS['G_SP']['launch'][$configname] as $launch ){
181.
if( is_array($launch) ){
182.
183.
$reval = spClass($launch[0])->{$launch[1]}($launchargs);
}else{
184.
$reval = call_user_func_array($launch, $launchargs);
185.
}
186.
if( TRUE == $returns )return $reval;
187.
}
- F:\freehost\syzsyz\web\init\spFunctions.php on line 94
89.
* @param value 存入的值,在读取数据和删除数据的模式下均为NULL
90.
* @param life_time 变量的生存时间,默认为永久保存
91.
*/
92.
function spAccess($method, $name, $value = NULL, $life_time = -1){
93.
// 使用function_access挂靠点
94.
95.
if( $launch = spLaunch("function_access", array('method'=>$method, 'name'=>$name, 'value'=>$value, 'life_time'=>$life_time), TRUE) )return $launch;
// 准备缓存目录和缓存文件名称,缓存文件名称为$name的MD5值,文件后缀为php
96.
if(!is_dir($GLOBALS['G_SP']['sp_cache']))__mkdirs($GLOBALS['G_SP']['sp_cache']);
97.
$sfile = $GLOBALS['G_SP']['sp_cache'].'/'.$GLOBALS['G_SP']['sp_app_id'].md5($name).".php";
98.
// 对$method进行判断,分别进行读写删的操作
99.
if('w' == $method){
- F:\freehost\syzsyz\web\init\init.php on line 89
84.
$_REQUEST[$GLOBALS['G_SP']["url_action"]] :
85.
$GLOBALS['G_SP']["default_action"];
86.
87.
//加载用户级设置变量
88.
89.
90.
if(!spAccess('r','ybconfig')){ //读取设置
$ybconfig = spClass('db_setting')->getConfig();
91.
spAccess('w','ybconfig',$ybconfig,36000);
92.
}else{
93.
$ybconfig = spAccess('r','ybconfig');
94.
}
- F:\freehost\syzsyz\web\index.php on line 20
15.
ini_set('session.gc_maxlifetime',$lefttime);
16.
if(isset($_COOKIE['qingblog'])){ session_id($_COOKIE['qingblog']);}
17.
if(isset($_POST['ssid'])) {session_id($_POST['ssid']); }//swfupload 提交也要判断
18.
if(!is_file(APP_PATH."/config.php")){header('Location:install/');}
19.
require(APP_PATH."/config.php"); //载入配置文件
20.
21.
require(SP_PATH."/init.php");
require(SP_PATH."/Extensions/thFunctions.php");
22.
import(APP_PATH.'/controller/top.php'); //TOP全局控制器
23.
header("Content-type: text/html; charset=utf-8");
24.
spRun();
25.
?>