In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail the types of error tips in php and how to solve them. The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what types of error tips in php and how to solve them" can help you solve your doubts.
Php error prompt types are: 1, parsing errors or syntax errors, this error will stop the execution of the program, and display error messages; 2, fatal errors; 3, warning errors, means that there is no error in the syntax of the program, but in the process of execution, found that the program is unreasonable, thus prompting a warning message, and the program will continue to execute; 4, pay attention to errors.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
Php error prompt type
1. Parsing error or syntax error
Syntax errors are the easiest to encounter and solve in programming, for example, an error message is displayed when a semicolon is omitted. This error stops the execution of the program and displays an error message. We can correct the program according to the error message and then re-execute it.
[example] the following demonstrates common syntax errors and related error messages through simple code.
The end of line 4 in the above code is omitted; so running the above code displays the following error message:
Parse error: syntax error, unexpected 'echo' (T_ECHO) in D:\ WWW\ index.php on line 5
As you can see from the above example and the results of the run, syntax errors prevent the program from continuing to execute downward. Only when these errors are solved can the program be executed smoothly.
2. Fatal error:
This is an error type that the PHP compiler understands PHP code but it recognizes undeclared functions. This means that the function is called without a function definition.
For example
Description: in line 10, the function diff () is called, but the function diff () does not have a declaration definition, so it gives an error.
3. Warning error:
There is no error in the syntax of the program, but during execution, PHP will find something unreasonable in the program and prompt a warning message, but the program will continue to execute.
Example: when 0 is taken as a divisor, it will cause an error in running the program and output error information.
Error:
4. Pay attention to errors:
It is similar to warning errors, which means that the program contains errors, but it allows scripts to be executed.
Error:
Description: this program uses the undeclared variable $y, so it gives an error message.
After reading this, the article "what are the types of php error tips and how to solve them" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.