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: 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.