数据库链接错误 : Ŀܾӡ
- D:\wwwroot\jtctian\wwwroot\SpeedPHPs\Drivers\mysql.php on line 78
73.
* @param dbConfig 数据库配置
74.
*/
75.
public function __construct($dbConfig)
76.
{
77.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' : 'mysql_connect';
78.
79.
$this->conn = $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['login'], $dbConfig['password']) or spError("数据库链接错误 : " . mysql_error());
mysql_select_db($dbConfig['database'], $this->conn) or spError("无法找到数据库,请确认数据库名称正确!");
80.
$this->exec("SET NAMES UTF8");
81.
}
82.
83.
/**
- D:\wwwroot\jtctian\wwwroot\SpeedPHPs\spFunctions.php on line 152
147.
if( TRUE == import($class_name.'.php')){
148.
$has_define = TRUE;
149.
}
150.
}
151.
if(FALSE != $has_define){
152.
153.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- D:\wwwroot\jtctian\wwwroot\SpeedPHPs\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.
* 获取数据库版本
- D:\wwwroot\jtctian\wwwroot\SpeedPHPs\spFunctions.php on line 152
147.
if( TRUE == import($class_name.'.php')){
148.
$has_define = TRUE;
149.
}
150.
}
151.
if(FALSE != $has_define){
152.
153.
$GLOBALS['G_SP']["inst_class"][$class_name] = new $class_name($args);
return $GLOBALS['G_SP']["inst_class"][$class_name];
154.
}
155.
spError($class_name."类定义不存在,请检查。");
156.
}
157.
- D:\wwwroot\jtctian\wwwroot\controller\main.php on line 81
76.
}
77.
}
78.
79.
function getnext(){
80.
$id = intval($this->spArgs("id"));
81.
82.
$products = spClass('product');
try {
83.
if(!$type_rs = $products->join("hnyn_articlestyle", "hnyn_articlestyle.sid = hnyn_products.ptype")->find(array("hnyn_products.pid"=>$id), "hnyn_products.ptype, hnyn_articlestyle.islist")) throw new Exception("参数错误");
84.
$type = $type_rs['ptype'];
85.
$allnews_rs = $products->findAll(array("ptype"=>$type), "hnyn_products.`top` desc, hnyn_products.`order` asc, hnyn_products.`status` desc, hnyn_products.`posttime` desc, hnyn_products.`pid` desc", 'pid, name');
86.
$orderarray = array();
- D:\wwwroot\jtctian\wwwroot\SpeedPHPs\spFunctions.php on line 26
21.
22.
//执行before_display注入函数
23.
spInject('before_display', array($handle_controller) );
24.
25.
// 路由并执行用户代码
26.
27.
$handle_controller->$__action();
28.
// 控制器程序运行完毕,进行模板的自动输出
29.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
30.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
31.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
- D:\wwwroot\jtctian\wwwroot\index.php on line 93
88.
unset($in);
89.
}
90.
91.
//dump($_SESSION);
92.
require(APP_PATH . DS . "libs" . DS . "zxinit.php");
93.
94.
spRun();
95.
?>