Common PHP errors analysis:
PHP common errors:
1. Syntax error
Parse error: syntax error, unexpected T_VARIABLE in E: \ guestbook \ user. php on line 268
Generally, it is less than a semicolon, which is possible in the previous or next line.
Parse error: syntax error, unexpected '.' in F: \ www \ blog \ article. php on line 100
Multiple ".". Similarly, there are multiple ";" and so on.
Notice: Undefined variable: a in...
An undefined variable a is used.
Parse error: syntax error, unexpected T_ELSE in
If else sentence logic error
Parse error: syntax error, unexpected $ end in
Generally, braces do not match.
Parse error: syntax error, unexpected T_STRING in
Generally, you forget to write a semicolon at the end of a sentence.
Warning: Invalid argument supplied for foreach () in
The first parameter of foreach must be an array.
Warning: Wrong parameter count for a in
The number of function parameters is incorrect.
Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at F: \ www \ blog \ index. php: 10) in F: \ www \ blog \ shortdes \ config. inc. php on line 10
Warning: annot modify header information-headers already sent by (output started at F: \ www \ blog \ index. php: 10) in F: \ www \ blog \ shortdes \ config. inc. php on line 12
No output exists before the session, so is the cookie that you agree.
Fatal error: Cannot redeclare
The function has been defined and cannot be re-defined. the class cannot have the same name.
2. SQL statement error
Warning: mysql_fetch_assoc (): supplied argument is not a valid MySQL result resource in
It indicates that the preceding SQL statement execution failed. it may be an SQL statement error. if the analysis fails, you can use Mysql_error () to check which part of the error is returned.
No database selected
Generally, the database is not connected.
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)
The password of the database user name is incorrect.
Unknown database 'cms01_1 ′
The database does not exist.
Table 'cms0726. test' doesn' t exist
The table does not exist.
Unknown column 'ABC' in 'Field list'
The field does not exist.
Column count doesn't match value count at row 1
The number of field values in SQL statements is different from the number of field names.
3. Template error
Fatal error: Smarty error: [in message_list.html line 22]: syntax error: 'foreach: item' must be a variable name (literal string)
The item after foreach must be followed by a variable name. without $, it is a string.
Fatal error: Smarty error: [in admin/tpl/class_detail.html line 14]: syntax error: unrecognized tag: cs. student_id (Smarty_Compiler.class.php, line 436) in D: \ www \ web \ xmphp \ inc \ smarty \ Smarty. class. php on line 1088
Smarty syntax error: less than $
Warning: Smarty error: unable to read resource: cannot message_list1.html "in
The template file cannot be found. check whether the file name is wrong or the file is stored in another directory.
Fatal error: Smarty error: [in order_detail.html line 171]: syntax error: unclosed tag \ {elseif} (opened line 157 ). (Smarty_Compiler.class.php, line 317) in F: \ www \ guestbook \ xmphp \ inc \ smarty \ Smarty. class. php on line 1088
Html page syntax error, less end tag <%/if %>
If you encounter any problems in the future, I will update them in time!