Share The PHP error message explanation. When I was learning PHP, I often encountered various error prompts. today I am very familiar with the error prompts and explanations. now I want to learn from them. Haha ..... 1. Notice. Haha .....
1. Notice: Undefined variable: variable name in
Note: an unspecified variable is used.
2. Parse error: syntax error, unexpected T_ELSE in
If (){
} Else if (){
}
Echo $ test;
Else {
}
Note: The if else sentence is incorrect.
3. Parse error: syntax error, unexpected $ end in D
Note: generally, braces do not match.
4. Parse error: syntax error, unexpected T_STRING in
Note: Generally, you forget to write a semicolon at the end of a sentence.
5. Warning: Invalid argument supplied for foreach () in
Note: The first parameter of foreach must be an array.
6. Warning: mysql_fetch_assoc (): supplied argument is not a valid MySQL result resource in
Note: This indicates that the preceding SQL statement failed to be returned. it may be an SQL statement error. if the analysis fails, you can print the Mysql_error (). check the specific error.
7. No database selected
Note: Generally, the database is not connected.
8. Warning: mysql_connect () [function. mysql-connect]: Access denied for user 'root' @ 'localhost' (using password: YES) in ..... On line 3
Access denied for user 'root' @ 'localhost' (using password: YES)
Note: The database username and password are incorrect.
9. Unknown database 'cms01_1 ′
Note: This database does not exist.
10. Table 'cms0726. test' doesn' t exist
Note: The table does not exist.
11. Unknown column 'ABC' in 'Field list'
Note: the field does not exist.
12. Column count doesn't match value count at row 1
Note: The number of field values in SQL statements is different from that of field names.
13. Warning: Wrong parameter count for function name in
Note: The number of function logarithm is less.
14. Fatal error: Smarty error: [in message_list.html line 22]: syntax error: 'foreach: item' must be a variable name (literal string)
Note: If you look at the row number, it means that the item after foreach must be followed by a variable name without adding $. it is a string (note: There is no single-Double quotation)
15. Fatal error: Smarty error: [in message_list.html line 24]: syntax error: unrecognized tag: msg. message_id
Note: $ is missing before the variable in the template
16,
Warning: Smarty error: unable to read resource: cannot message_list1.html "in
Note: The template file cannot be found. check whether the file name is incorrect or the file is stored in another directory.
17. Fatal error: Cannot redeclare get_sort1 () (previusly declared in
Note: The function has been defined and cannot be redefined.
Warning: I often encounter various error prompts. today I am very satisfied with this error prompt and explanation. now I will turn it over for us to learn. Haha ..... 1. Notice: Undef...