This article describes the PHP common error hint meaning explanation. Share to everyone for your reference, specific as follows:
In learning PHP, often encountered a variety of error prompts, today to see this error tips and explanations feel very good, now turned over for us to learn. Oh.....
1, notice:undefined variable: variable name in
Note: A variable with no definition is used
2, Parse error:syntax error, unexpected t_else in
If () {
}else if () {
}
Echo $test;
Else {
}
Note: is if else if else sentence pattern error
3, Parse error:syntax error, unexpected $end in D
Note: The curly braces generally 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 foreach must be an array
6, Warning:mysql_fetch_assoc (): supplied argument isn't a valid MySQL result resource in
Note: This indicates that the previous execution of SQL return failed, the general may be SQL statement errors, such as analysis does not come out, just can print out mysql_error (); Look where it's wrong.
7, No Database selected
Note: There is generally no connection to the database
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 username password is wrong
9, Unknown database ' cms07261′
Note: no this database
10, Table ' cms0726.test ' doesn ' t exist
Note: Table does not exist
11, Unknown column ' abc ' in ' Field list '
Note: 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 the number of digits
14, Fatal error:smarty error: [in message_list.html]: syntax error: ' Foreach:item ' must to be a variable name (liter Al string)
Note: Look at the line number, indicating that the item after the foreach must be followed by a variable name, without $, is a string (note: no single double quotes)
15, Fatal Error:smarty error: [In message_list.html line]: syntax error:unrecognized tag:msg.message_id
Note: missing $ before variable in template
16, Warning:smarty error:unable to read resource: "Message_list1.html" in
Note: The template file could not be found, to see if the file name was wrong or the file was stored in a different directory.
17, Fatal Error:cannot redeclare get_sort1 () (previously declared in
Note: The function has already been defined and cannot be redefined
I hope this article will help you with your PHP programming.