<?php
if ($_SESSION['leveluser']=='user'{?>
<div id="header">
<div id="menu">
<ul>
<li><a href=?rajaampat=info><img src="icon/globe.ico" border="0px" width="12px" height="13px" > Home</a></li>
<?php include "menu.php"; ?>
<li><a href=logout.php><img src="icon/globe.ico" border="0px" width="12px" height="13px" > Logout</a></li>
</ul>
<p> </p>
</div>
<div id="content">
<?php include "content.php"; ?>
</div>
<?php}elseif ($_SESSION['leveluser']=='admin'){?>
<div id="header">
<div id="menu">
<ul>
<li><a href=?rajaampat=info><img src="icon/globe.ico" border="0px" width="12px" height="13px" > Home</a></li>
<?php include "menu2.php"; ?>
<li><a href=logout.php><img src="icon/globe.ico" border="0px" width="12px" height="13px" > Logout</a></li>
</ul>
<p> </p>
</div>
<div id="content">
<?php include "content2.php"; ?>
</div>';
<?php}else {?>
<p><b>MAAF ANDA HARUS LOG IN do e</b></p>";
<?php}?>
我一直收到此错误: 解析错误:语法错误,在第98行的C:\ xampp \ htdocs \ WEB RAJA AMPAT \ homedir \ public_html \ myadmin \ administrator \ media.php中出现意外的'?>'
提前致谢
edit:无法在“ PHP解析/语法错误”中找到我的答案;如何解决这些错误? “
答案 0 :(得分:1)
在您的代码中,检查if
条件,您尚未关闭括号。将您的if
条件替换为以下内容:
请更改
if($_SESSION['leveluser']=='user'{?>
到
if($_SESSION['leveluser']=='user'){ ?>
答案 1 :(得分:-1)
var1 = "Sentence"
var2 = "Sentence! Another sentence."