致命错误:在第5行的/includes/online.inc.php中调用非对象的成员函数connect()

时间:2015-06-13 19:13:59

标签: php require-once

很抱歉,但现在我有另一个错误...:致命错误:在第5行/home/u909132125/public_html/includes/online.inc.php中的非对象上调用成员函数connect(),这里是我的代码:

<?php
$uo_sessionTime = 5;
error_reporting(E_ERROR | E_PARSE);
$uo_ip = $_SERVER['REMOTE_ADDR'];
$myDb->connect();
$uo_query = "DELETE FROM yob_usersonline WHERE unix_timestamp() - lastvisit >= $uo_sessionTime * 60"; mysql_query($uo_query);
$uo_query = "SELECT lastvisit FROM yob_usersonline WHERE visitor = '$uo_ip'";
$uo_result = mysql_query($uo_query);
if(mysql_num_rows($uo_result) == 0) {
$uo_query = "INSERT INTO yob_usersonline VALUES('$uo_ip', unix_timestamp())";
mysql_query($uo_query);
} else {
$uo_query = "UPDATE yob_usersonline SET lastvisit = unix_timestamp() WHERE visitor = '$uo_ip'";
mysql_query($uo_query); } $myDb->close();
?>

0 个答案:

没有答案