麻煩各位幫忙看下,網站發布後這個到底什麼問題?

來源:互聯網
上載者:User
實在太著急了,已經一周時間都沒找到原因。由於本人不是做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 中去找一下,看看是否是你寫錯了

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.