Topic awaiting preservation: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Maryland, USA |
posted 07-30-2004 22:31
I am having this error whether I comment the code out or not. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 07-31-2004 00:47
I don't know if this is the problem, but I ran into somthing like this once when using a PHP <<<HERE once. I found that the parser didn't like the HERE to be indented in certain ways. |
Paranoid (IV) Inmate From: Maryland, USA |
posted 07-31-2004 07:12
Perhaps, but I have run through it a number of times and I couldn't see anything wrong with my heredoc syntax. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 07-31-2004 09:21
first herodoc: you've a space behind the <<<EOT. That causes the 'unexpected T_SL'. |
Paranoid (IV) Inmate From: Maryland, USA |
posted 08-01-2004 07:11
Thanks for the help, Prime, but after trying those solutions (and not getting anywhere), I discovered there was a tab after "EOD." I removed it and the whole thing was fixed. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 08-01-2004 08:11
you need quotes around strings. |
Bipolar (III) Inmate From: Rapla, Estonia |
posted 08-01-2004 11:05
if($secure) && isset($_GET['userName']) |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 08-01-2004 21:11
Actually you don't as long as your if/else statements are only one line. |
Paranoid (IV) Inmate From: Maryland, USA |
posted 08-01-2004 21:41
Yeah, I added those in. That was an old bit of code that I reused. After fixing those errors I went through and cleaned up my code. Also, that was the error report - it removes quotes from those for some reason. |