我想它,如果用户没有登录,显示请登录,如果用户在显示内容登录使用if语句,回声在if语句回声中?
这一切的伟大工程,但禁止列为0 =不禁止,1 =禁止 但我想它说,如果禁止== 0则说没有,如果禁止== 1,则说是 但是当我这样做,它给了我一个错误
<?
if (!$UserLoggedIn) {
echo "
PLEASE LOGIN
";
} else {
echo "
<div style='
background: #FFF;
padding: 25px;
box-shadow: 0 2px 2px #bbb;
margin: auto;
position:relative;
width: 600px;
'>
<center>
Welcome, $GetLoggedUser->username
<br>
Here's some statistics about your account:
<br>
Username: $GetLoggedUser->username
<br>
Email: $GetLoggedUser->email
<br>
UserID: $GetLoggedUser->id
<br>
Banned from game:
if($GetLoggedUser->banned == '0') { echo ' no '; } else { echo ' yes '; }
<br>
Banned from website: $GetLoggedUser->Ban (obviously not or this page wouldn't show up)
<center/>
<div/>
";
}
?>
不要依赖[short open tags](http://php.net/manual/en/language.basic-syntax.phptags.php)在任何地方工作。它们陈旧,不推荐使用,并且不太可能在配置良好的服务器上工作。 – miken32