Programming is inevitable. The key is how to solve the error. In fact, php error prompts are very clear in the future. Generally, you will be prompted for the row number and error level. you can use error_reporting () function to control the error level. if this is not enough, install the php debugger.
Programming is inevitable. The key is how to solve the error. In fact, php error prompts are very clear in the future. Generally, you will be prompted for the row number and error level. you can use error_reporting () function to control the error level. if this is not enough, install the php debugging tool x-Debug. in today's php Tutorial, let's talk about the principles and solutions of the php parsing error parse error:
1. for example, the following php code:
This is because the second line is missing; an error occurs, but the display is:
(! ) Parse error: syntax error, unexpected T_IF in F: \ web \ zend \ exercise \ test. php on line3
But it is the third line, so parsing errors is very troublesome, because you do not know which line is actually wrong.
2. check the following php code:
Due to the lack of} to end a function, the following error occurs:
(! ) Parse error: syntax error, unexpected $ end in F: \ web \ zend \ exercise \ test. php on line5
3. php pre-defined words cannot be assigned to a value, such as while and function. Otherwise, the following error occurs:
(! ) Parse error:, unexpected T_WHILE in
These common errors are easy to avoid. all you need is a powerful editor, such as Zend Studio and Eclipse for php. In addition, 10 excellent php development tools are recommended!