Forum Moderators: coopster

Message Too Old, No Replies

Parse error: syntax error-Solution

         

kerrylee

3:10 am on Mar 17, 2012 (gmt 0)

10+ Year Member



Parse error: syntax error, unexpected $ end in D: \ wamp \ www \ huifu \ class \ functions.php on line 1246

Searched the internet many articles say that php short tags did not appear this error message, but I take the same action in the company's computer above wamp environment, finally, I thought in the company's computer above wamp environment inside the short_open_tag php.ini is set to on, then open their computers above short_open_tag really solve the problem.

Summarize the set short_open_tag to on the way:

Method 1:

Open the D: \ wamp \ php directory php.ini, find the short_open_tag behind the off to be on

Method 2:

Left-click on the computer the lower right corner of the wamp icon --- php settings --- select the short_open_tag, the short_open_tag see the front to bring from triangle

[edited by: incrediBILL at 11:27 am (utc) on Mar 17, 2012]
[edit reason] URL removed [/edit]

incrediBILL

12:53 pm on Mar 18, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That error is usually caused by a missing bracket {} in the code or an improperly created class, something like that.

If you post the code we might be able to spot the error.

Also, from the command line try this "php -l examplephpfile.php" and see if lint (syntax check) will give you additional clues.