我想它,如果用戶沒有登錄,顯示請登錄,如果用戶在顯示內容登錄使用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