数据库链接错误 : Can't connect to local MySQL server through socket '/www/mysql/service/mysql.sock' (2)
- /www/website/shop_sstdyf/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.
* 对特殊字符进行过滤
- /www/website/shop_sstdyf/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.
- /www/website/shop_sstdyf/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.
*
- /www/website/shop_sstdyf/model/Lib_Common.php on line 17
12.
class Lib_Common extends spModel
13.
{
14.
private $cach_path = '/tmp/static_caches/';//缓存系统配置文件路径
15.
public function __construct()
16.
{
17.
18.
parent::__construct();
}
19.
/**
20.
* 创建像这样的查询: "IN('a','b')";
21.
*
22.
* @access public
- /www/website/shop_sstdyf/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.
- /www/website/shop_sstdyf/SpeedPHP/Core/spController.php on line 33
28.
//rar_dump($this->shops);
29.
30.
if (TRUE == $GLOBALS ['G_SP']['view']['enabled']) {
31.
$this->v = spClass ( 'spView' );
32.
}
33.
34.
$this->shops = spClass('Lib_Common')->read_static_cache('shop_config');
$this->qq = explode(",",$this->shops['service_qq']);
35.
//var_dump($this->shops);
36.
//根据来源设置COOKIE 保留7天
37.
$ccid = strip_tags(trim($this->spArgs('ccid')));
38.
if ($_COOKIE['ccid'] != $ccid && $ccid != '')
- /www/website/shop_sstdyf/controller/index.php on line 10
5.
}
6.
class index extends spController
7.
{
8.
public function __construct()
9.
{
10.
11.
parent::__construct();
$this->listStr = spClass('Lib_Nav')->T_topandfooter();
12.
//底部帮助文档
13.
$Cls = spClass('Lib_ArticleCat')->findAll(array(
14.
'parent_id' => 6
15.
),'sort_order asc');
- /www/website/shop_sstdyf/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.
- /www/website/shop_sstdyf/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.
}
- /www/website/shop_sstdyf/index.php on line 13
8.
$spConfig['controller_path'] = APP_PATH.'/controller/';
9.
$spConfig['view']['config']['template_dir'] = APP_PATH . template_Url;
10.
11.
require(SP_PATH."/SpeedPHP.php");
12.
// 入口文件全局定义位置 —— 全局定义、应用及操作
13.
14.
spRun();
?>