php - 未定义的属性函数成功警告
问题描述
我的代码有问题,总是出现这个警告,我是新手,我没有找到解决方案,他们能帮忙吗?
出现以下错误: Undefined property: Functions :: $ _ Sucess C: /xampp/htdocs/cash/index.php 代码第 14 行:
<?php
require_once('class/functions.class.php');
$_Func = new Functions();
if($_Func->_Error) require_once('error.php');
else if($_Func->_Sucess) require_once('sucess.php');
else if(!$_Func->isLogged) require_once('login.php');
else if(!$_Func->isLogged)
require_once('login.php');
else {if(@$_GET['page'] == 'donate')
require_once('donate.php');
else if(@$_GET['item'])
require_once('info.php');
else
require_once('loja.php');
}
?>
解决方案
错误仍然存在,sucess.php 将是这样的:
<?php if(!$_Func)return false; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Market</title>
<link rel="stylesheet" href="css/style.css" charset="utf-8">
</head>
<style type="text/css">
html{
overflow: hidden;
}
body {
margin:0;
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow:hidden;
background:url(images/mail.jpg) no-repeat;
color:#fff;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
</style>
<body>
<img src="" />
<div class="bar-center"></div>
<div id="content">
<div class="title"></div>
<div class="form">
<div class="erro">
<big><big><big><big><font color=\"#FF0000\">SUCESS</font></big></big></big></big><br><br>
<span class="tarea">
<?php echo $_Func->_Sucess;?>
</span>
<div class="return">
<a href="?page=home">
<img src="img/botton-03.gif" width="159" height="42" name="Image3" border="0">
</div>
</div>
</a>
</div>
</div>
</body>
</html>