Re: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

From: Date: Tue, 15 Mar 2005 20:03:33 +0000
Subject: Re: parse error, unexpected T_ENCAPSED_AND_WHITESPACE
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-210843@lists.php.net to get a copy of this message
Hello, Sorry about that. I took the source down after I solved the problem. The problem was a nasty type of syntax error caused by PHP implementation of HEREDOC string delimiting. I was using HEREDOC to stuff multiple lines of HTML into a string, in several places in my file, which is all fine and good. However, PHP does not recognize the delimiter token that marks the end of the string, if there is any whitespace on the same line. I had made sure that my token was all the way over to the beginning of the line, but what I *didn't* realize was that there was a couple spaces after the token. This caused the parser to basically treat the whole rest of the script file as a heredoc string, which is where the problems came from. Jeff Schmidt Jason Barnett wrote:
Jeff Schmidt wrote:
Hello, I've made the source available at: http://www.weldingconsultants.com/wcapp/admin.phps
404 error when I just tried. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins


« previous php.general (#210843) next »