Maison > Article > développement back-end > 麻烦各位帮忙看下,网站发布后这个到底什么问题?
实在太着急了,已经一周时间都没找到原因。由于本人不是做php的,所有完全一点头绪都没有
DB.inc.php 文件代码如下:
/*
* 数据库类
* 配置数据库变量为本地应用
*/
if(!defined('DLYDB_INC_PHP'))
{
define('DLYDB_INC_PHP', true);
require_once('config.inc.php');
class DlySql extends DB_Sql {
var $Host;
var $Database;
var $User;
var $Password;
var $Record = array();
var $Auto_free = 1;
var $Row;
function DlySql($query = "")
{
global $host,$database,$dbuser,$dbpassword;
//初始化成config.inc.php中的设置
$this->Host=$host;
$this->Database=$database;
$this->User=$dbuser;
$this->Password=$dbpassword;
$this->query($query);
}
function query($Query_String) {
/* No empty queries, please, since PHP4 chokes on them. */
if ($Query_String == "")
/* The empty query string is passed on from the constructor,
* when calling the class without a query, e.g. in situations
* like these: '$db = new DB_Sql_Subclass;'
*/
return 0;
if (!$this->connect()) {
return 0; /* we already complained in connect() about that. */
};
# New query, discard previous result.
if ($this->Query_ID) {
$this->free();
}
if ($this->Debug)
printf("Debug: query = %s
\n", $Query_String);
$this->Query_ID = @mysql_query($Query_String,$this->Link_ID);
$this->Row = 0;
$this->Errno = mysql_errno();
$this->Error = mysql_error();
if (!$this->Query_ID) {
//$this->saveQueryLog($this->Errno,$this->Error,$Query_String);
//$this->halt("Invalid SQL: ".$Query_String);
if ($this->locked) {
$this->unlock();
}
//header("Location:../admin/queryError.php");
}
# Will return nada if it fails. That's fine.
return $this->Query_ID;
}
}//class
}
?>
class DlySql extends DB_Sql {
这个 DB_Sql 类没有定义
到 config.inc.php 中去找一下,看看是否是你写错了