数据库链接错误 : No such file or directory
- /www/wwwroot/ifengspace.com/JedooPHP/Drivers/mysql.php on line 166
161.
* @param dbConfig 数据库配置
162.
*/
163.
public function __construct($dbConfig)
164.
{
165.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' : 'mysql_connect';
166.
167.
$this->conn = $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['user'], $dbConfig['password']) or JError("数据库链接错误 : " . mysql_error());
mysql_select_db($dbConfig['database'], $this->conn) or JError("无法找到数据库,请确认数据库名称正确!");
168.
$this->exec("SET NAMES " . $dbConfig['charset']);
169.
}
170.
/**
171.
* 对特殊字符进行过滤
- /www/wwwroot/ifengspace.com/JedooPHP/JFunctions.php on line 207
202.
$argString .= $comma . "\$args[$i]"; $comma = ', ';
203.
}
204.
}
205.
206.
if($registerGlobal) {
207.
208.
eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);");
return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.
}
210.
else {
211.
return new $className($argString);
212.
}
- /www/wwwroot/ifengspace.com/JedooPHP/MVC/JModel.php on line 56
51.
{
52.
if( null == $this->tbl_name )$this->tbl_name = $GLOBALS['G_JCONFIG']['db']['prefix'] . $this->table;
53.
if( '' == $GLOBALS['G_JCONFIG']['db_driver_path'] ){
54.
$GLOBALS['G_JCONFIG']['db_driver_path'] = $GLOBALS['G_JCONFIG']['drivers_dir'].'/'.$GLOBALS['G_JCONFIG']['db']['driver'].'.php';
55.
}
56.
57.
$this->_db = JLoadClass('db_'.$GLOBALS['G_JCONFIG']['db']['driver'], array(0=>$GLOBALS['G_JCONFIG']['db']), $GLOBALS['G_JCONFIG']['db_driver_path']);
}
58.
59.
/**
60.
* 开始事务
61.
*/
- /www/wwwroot/ifengspace.com/JedooPHP/JFunctions.php on line 207
202.
$argString .= $comma . "\$args[$i]"; $comma = ', ';
203.
}
204.
}
205.
206.
if($registerGlobal) {
207.
208.
eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);");
return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.
}
210.
else {
211.
return new $className($argString);
212.
}
- /www/wwwroot/ifengspace.com/modules/books/books.php on line 1107
1102.
* 图书详细信息
1103.
*/
1104.
function bookDetailsAction() {
1105.
$book_id = intval($this->JArgs('id'));
1106.
if($book_id) {
1107.
1108.
$books = JLoadClass('books');
$book = $books->get($book_id);
1109.
if($book) {
1110.
$books->incrField(array('book_id'=>$book_id), 'hits');
1111.
$this->pictures = explode(',', $book['pictures']);
1112.
- /www/wwwroot/ifengspace.com/JedooPHP/JFunctions.php on line 31
26.
eval($GLOBALS['G_JCONFIG']["dispatcher_error"]);
27.
exit;
28.
}
29.
30.
// 执行用户代码
31.
32.
$__handle_controller->$__actionFunc();
33.
//显示前执行自定义代码
34.
JInject("before_display");
35.
36.
// 控制器程序运行完毕,进行模板的自动输出
- /www/wwwroot/ifengspace.com/index.php on line 45
40.
if(count($server_info) > 1) {
41.
$server_domain = $server_info[count($server_info)-2];
42.
define('DOMAIN', $server_domain);
43.
}
44.
45.
46.
JStart();
?>