• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

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

php 搞代码 3年前 (2022-01-23) 12次浏览 已收录 0个评论
文章目录[隐藏]

实在太着急了,已经一周时间都没找到原因。由于本人不是做php的,所有完全一点头绪都没有

DB.inc.php 文件代码如下:

<?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=$dbp本文来源gaodai#ma#com搞@@代~&码*网/搞gaodaima代码assword;
$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 中去找一下,看看是否是你写错了


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:麻烦各位帮忙看下,网站发布后这个到底什么问题?

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址