Share PHP Error tips explaining _php tutorial

Source: Internet
Author: User
Tags parse error php error
In the learning of PHP, often encountered a variety of error hints, today see this error hints and explanations feel very good, now turn around, for us to learn. Oh.....
1. notice:undefined variable: variable name in
Note: A variable that is not defined is used
2. Parse error:syntax error, unexpected t_else in
If () {
}else if () {
}
Echo $test;
Else {
}
Note: is if else if else syntax error
3. Parse error:syntax error, unexpected $end in D
Note: Usually curly braces do not match
4. Parse error:syntax error, unexpected t_string in
Note: Generally forget to write the end of the sentence semicolon
5, warning:invalid argument supplied for foreach () in
Note: The first parameter of a 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 previous execution of SQL return failure, the general may be a SQL statement error, such as analysis can not come out, just print out mysql_error (); Look at the exact place where it's wrong.
7, No Database selected
Note: There is generally no database 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: Database user name password is wrong
9, Unknown database ' cms07261′
Note: This database is not
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 the SQL statement is different than the number of field names
13. Warning:wrong parameter count for function name in
Note: The function is less than a few numbers
14, Fatal error:smarty error: [In message_list.html line]: syntax error: ' Foreach:item ' must is a variable name (Litera L string)
Note: Look at the line number, stating that after the item in foreach must be followed by a variable name, without $, is a string (note: There is no single double cited)
15, Fatal Error:smarty error: [in the message_list.html line]: syntax error:unrecognized tag:msg.message_id
Note: The variables in the template are missing before the $
16.
Warning:smarty error:unable to read resource: ' message_list1.html ' in
Note: The template file cannot be found to see if the file name is incorrectly written or if it is stored in another directory.
17, Fatal Error:cannot redeclare get_sort1 () (previously declared in
Note: Functions have already been defined and cannot be redefined

http://www.bkjia.com/PHPjc/478441.html www.bkjia.com true http://www.bkjia.com/PHPjc/478441.html techarticle in the learning of PHP, often encountered a variety of error hints, today see this error hints and explanations feel very good, now turn around, for us to learn. Oh..... 1. Notice:undef ...

  • Related Article

    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.