Home  >  Article  >  Backend Development  >  麻烦各位帮忙看下,网站发布后这个到底什么问题?

麻烦各位帮忙看下,网站发布后这个到底什么问题?

WBOY
WBOYOriginal
2016-06-23 13:20:281140browse

实在太着急了,已经一周时间都没找到原因。由于本人不是做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 中去找一下,看看是否是你写错了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn