| When accessing the php program, the following error is reported: Parse error: syntax error, unexpected $ end in D: \ xampp \ htdocs \ guestBook. php on line 330: check the program's 330 lines and the last line of code. what is the error? Found:
When accessing the php program, the following error is reported: Parse error: syntax error, unexpected $ end in D: \ xampp \ htdocs \ guestBook. php on line 330: check the program's 330 lines and the last line of code. what is the error? Found: In PHP 5, the following error may appears as an error entry in Apache error log or simply displays on PHP web page, even if calling to php scripts with php_info () works perfectly and successfully returns information on PHP deployments:
Parse Error: syntax error, unexpected $ end in ..... Scripts. php on line...
The error may caused by a missing curly bracket in PHP script coding. beside, it may also caused by error in PHP coding in class definition, as in PHP, a class definition cannot be broke up and distributed into multiple files, or into multiple PHP blocks, unless the break is within a method declaration.
But more commonly, the error is often caused by the use of Short Open tags in PHP,
To use short open tags, it must be enabled in PHP. INI. Search for short_open_tag in PHP. INI, and change the value to On. The line shoshould look line:
Short_open_tag = On
I don't know much about english. it probably means that short labels are used for errors. you can set short_open_tag = On in php. ini.
The original Parse error prompt is generally a syntax error. an open label is used, and the statement is not terminated, that is, some basic programming errors. for example, if () or () {...} I forgot "}"; Forgot "?> ". Check the code carefully. The "}" is missing, and the modification program runs normally. |