数据库链接错误 : Access denied for user 'sq_kanchaoyang'@'localhost' (using password: YES)
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\SpeedPHP\Drivers\mysql.php on line 93
88.
* @param dbConfig 数据库配置
89.
*/
90.
public function __construct($dbConfig)
91.
{
92.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' : 'mysql_connect';
93.
94.
$this->conn = $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['login'], $dbConfig['password']) or spError("数据库链接错误 : " . mysql_error());
mysql_select_db($dbConfig['database'], $this->conn) or spError("无法找到数据库,请确认数据库名称正确!");
95.
$this->exec("SET NAMES GBK");
96.
}
97.
/**
98.
* 对特殊字符进行过滤
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\SpeedPHP\spFunctions.php on line 145
140.
if( TRUE == import($class_name.'.php')){
141.
$has_define = TRUE;
142.
}
143.
}
144.
if(FALSE != $has_define){
145.
146.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
147.
}
148.
spError($class_name."类定义不存在,请检查。");
149.
}
150.
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\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'], $GLOBALS['G_SP']['db'], $GLOBALS['G_SP']['db_driver_path']);
}
54.
55.
/**
56.
* 从数据表中查找一条记录
57.
*
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\SpeedPHP\spFunctions.php on line 145
140.
if( TRUE == import($class_name.'.php')){
141.
$has_define = TRUE;
142.
}
143.
}
144.
if(FALSE != $has_define){
145.
146.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
147.
}
148.
spError($class_name."类定义不存在,请检查。");
149.
}
150.
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\controller\main.php on line 22
17.
return $tmpstr;
18.
}
19.
20.
21.
22.
23.
$love= spClass("love_setting");
$con="skey='sitename' or skey='icp' or skey='seodescription' or skey='seokeywords' or skey='seotitle' or skey='adminemail' ";
24.
$sites=$love->findAll($con,'NULL','*');
25.
$this->site=$sites;
26.
27.
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\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->v->auto_display($__tplname);
- E:\wwwroot\kanchaoyang\wwwroot\bbs\love\index.php on line 38
33.
34.
35.
36.
);
37.
require(SP_PATH."/SpeedPHP.php");
38.
spRun();