PHP "Expecting `T_STRING'...", and it's driving me nuts
Can someone please help me find out what's wrong with this code? It's in the middle of a web page, so I'll pull out everything around it.
Code:
echo <<< END (I have the call to session_start() up at the top of the file, and there's around 300 other lines of php code which use session variables just fine before hitting this one.) This is driving my absolutely nuts... :( |
Hi -
Try modifying your php.ini file, and make sure "register globals" is enabled: http://us2.php.net/register_globals |
Unfortunately, it is:
; You should do your best to write your scripts so that they do not require ; register_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of. register_globals = On What makes this weird is there's nothing wrong with that line, and I've used that same variable previously in the file...if the syntax parser was going to have a problem with it, why pick a later occurrance of it? |
Make sure the quotes match and every line has a semicolon.
One thing that helps debugging is to save a complicated expression to a variable, then "print" (or "echo") the variable. Code:
EXAMPLE: |
Well....I fooled around with it a bit, moved some of the more complex and hard-to-read expressions into variables, deleted some stuff and put it back in...in short, I have no idea what I did, but somehow it works again.
Many thanks!! |
All times are GMT -5. The time now is 02:02 PM. |