Parse error, according to php
Posted: Mon May 03, 2010 12:49 am
Well, I don't think i've ever spent so many hours looking at a single line of code. For some reason the following code is generating an error:
Parse error: syntax error, unexpected '{' in menu.php on line 1
yes - that is the entire file. it is intended to be included by another file, but i am still getting the error accessing directly.
When I remove this line the error goes away:
in addition this code gives me Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in menu.php on line 1
but this works fine
I do not understand at all what is going on... I have hundreds of other php files doing this exact same thing with no issue. Please tell me there is some logical explanation for this... thanks in advance
Parse error: syntax error, unexpected '{' in menu.php on line 1
Code: Select all
<div class="centerBorderBox" id="menu">
<p class="center"><b>Logged in user: </b><?php echo $login; ?><input type="button" value="Logout" action="logout.php?auth=<?php echo $auth; ?>"></p>
<p class="center">
<?php
if(isset($Pneed_approval)) { echo "<span class=\"bold\" style=\"color:maroon\">Your account is awaiting activation.</span>"; }
?>
</p>
</div>When I remove this line the error goes away:
Code: Select all
if(isset($Pneed_approval)) { echo "<span class=\"bold\" style=\"color:maroon\">Your account is awaiting activation.</span>"; }in addition this code gives me Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in menu.php on line 1
Code: Select all
<div class="centerBorderBox" id="menu">
<p class="center"><b>Logged in user: </b><?php echo $login; ?><input type="button" value="Logout" action="logout.php?auth=<?php echo $auth; ?>"></p>
<p class="center">
<?php
echo "hello";
?>
</p>
</div>Code: Select all
<div class="centerBorderBox" id="menu">
<p class="center"><b>Logged in user: </b><?php echo $login; ?><input type="button" value="Logout" action="logout.php?auth=<?php echo $auth; ?>"></p>
<p class="center">
<?php
?>
</p>
</div>I do not understand at all what is going on... I have hundreds of other php files doing this exact same thing with no issue. Please tell me there is some logical explanation for this... thanks in advance