数据库链接错误 : Can't connect to MySQL server on 'localhost' (10048)
- E:\wwwroot\idc\foshangtupian\web\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.
* 对特殊字符进行过滤
- E:\wwwroot\idc\foshangtupian\web\SpeedPHP\spFunctions.php on line 152
147.
}
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.
153.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name][\$inst_index]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name][$inst_index];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- E:\wwwroot\idc\foshangtupian\web\SpeedPHP\Core\spModelMulti.php on line 14
9.
$this->dbpre = ($this->bbs)?$GLOBALS['G_SP']['bbs']['prefix']:$GLOBALS['G_SP']['db']['prefix'];
10.
if( null == $this->tbl_name )$this->tbl_name = $this->dbpre . $this->table;
11.
if( '' == $GLOBALS['G_SP']['db_driver_path'] ){
12.
$GLOBALS['G_SP']['db_driver_path'] = $GLOBALS['G_SP']['sp_drivers_path'].'/'.$GLOBALS['G_SP']['db']['driver'].'.php';
13.
}
14.
15.
$this->_db_default = spClass('db_'.$GLOBALS['G_SP']['db']['driver'], array(0=>$GLOBALS['G_SP']['db']), $GLOBALS['G_SP']['db_driver_path']);
if($bbs_param&&$bbs_param['open'])
16.
$this->_db_bbs = spClass('db_'.$GLOBALS['G_SP']['bbs']['driver'], array(0=>$GLOBALS['G_SP']['bbs']), $GLOBALS['G_SP']['db_driver_path'],false,'bbs');
17.
18.
}
19.
- E:\wwwroot\idc\foshangtupian\web\SpeedPHP\spFunctions.php on line 152
147.
}
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.
153.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name][\$inst_index]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name][$inst_index];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- E:\wwwroot\idc\foshangtupian\web\extensions\UserLib.php on line 12
7.
8.
public function __construct()
9.
{
10.
$this->session = spClass('Session');
11.
$this->cookie = spClass('Cookie');
12.
13.
$this->ptx_user = spClass('ptx_user');
}
14.
15.
16.
function refresh_session(){
17.
$user_session = $this->get_session();
- E:\wwwroot\idc\foshangtupian\web\SpeedPHP\spFunctions.php on line 152
147.
}
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.
153.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name][\$inst_index]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name][$inst_index];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- E:\wwwroot\idc\foshangtupian\web\controller\basecontroller.php on line 13
8.
9.
public function __construct() {
10.
parent::__construct();
11.
$this->session = spClass('Session');
12.
$this->cookie = spClass('Cookie');
13.
14.
$this->user_lib = spClass('UserLib');
$this->ptx_settings = spClass('ptx_settings');
15.
$this->settings = $this->ptx_settings->getSettings();
16.
$this->check_language();
17.
$this->fetch_global();
18.
$this->current_user = $this->user_lib->get_session();
- E:\wwwroot\idc\foshangtupian\web\controller\pin.php on line 10
5.
*/
6.
class pin extends basecontroller
7.
{
8.
9.
public function __construct() {
10.
11.
parent::__construct();
$this->seo_title(T('pin'));
12.
}
13.
14.
public function index(){
15.
$num_per_page = $this->settings['ui_layout']['pin_pagenum'];
- E:\wwwroot\idc\foshangtupian\web\SpeedPHP\spFunctions.php on line 152
147.
}
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.
153.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name][\$inst_index]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name][$inst_index];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- E:\wwwroot\idc\foshangtupian\web\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.
}