Share PHP error message explanation

Source: Internet
Author: User
Tags parse error
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: Undefinedvariable: variable name in Note: an unspecified variable is used. 2. Parseerr... syntaxHighlighter. when I was learning PHP, a often encountered various error prompts. today, I am very familiar with the error prompts and explanations. now I want to turn it over for us to learn. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.