Download presentation
Presentation is loading. Please wait.
Published byああす わにべ Modified over 5 years ago
1
PHP Parse error Fatal error Warning Notice Updated : August 23,2012
Reference :
2
PHP Config C:\thaiabc\php\php.ini error_reporting = E_ALL phpinfo(); <? // ini_set('display_errors', '0'); // or // ini_set('error_reporting', E_ALL); // error_reporting(0); ?> HTTP 500 Internal Server Error The Website cannot display the page Reference :
3
ERROR TYPE Parse error: A problem with the syntax of your program, such as leaving a semicolon off of the end of a statement. The interpreter stops running your program when it encounters a parse error. Fatal error: A severe problem with the content of your program, such as calling a function that hasn't been defined. The interpreter stops running your program when it encounters a fatal error. Warning: An advisory from the interpreter that something is fishy (เหม็นคาว) in your program, but the interpreter can keep going. Using the wrong number of arguments when you call a function causes a warning. Notice: A tip from the PHP interpreter, playing the role of Miss Manners. For example, printing a variable without first initializing it to some value generates a notice. Reference :
4
Fatal error <? echo a(); ?> Fatal error: Call to undefined function a() in C:\thaiabc\apache2\htdocs\x.php on line 2
5
Notice โปรแกรมทำงานต่อไป หากพบ Notice จะไม่หยุดการทำงาน
<? echo $a; ?> Notice: Undefined variable: a in C:\thaiabc\apache2\htdocs\x.php on line 2
6
Parse error <? $a = 1; if ($a > 1) { echo "ok"; ?> Parse error: syntax error, unexpected $end in C:\thaiabc\apache2\htdocs\x.php on line 6
7
Parse error <? $a = 1; if ($a > 1 { echo "ok"; } ?> Parse error: syntax error, unexpected '{' in C:\thaiabc\apache2\htdocs\x.php on line 3
8
Notice <? $a = "true"; if ($b) { echo "ok"; } ?> Notice: Undefined variable: b in C:\thaiabc\apache2\htdocs\x.php on line 3
9
Parse error <? <body> echo "hello"; ?> Parse error: syntax error, unexpected '<' in C:\thaiabc\apache2\htdocs\x.php on line 2
10
Parse error <? $a = "hello'; if ($b) echo "c"; ?> Parse error: syntax error, unexpected T_STRING in C:\thaiabc\apache2\htdocs\x.php on line 3
11
Notice <? $a = array(5,6,7); echo $a[0]; echo $a[$a[0]]; ?> 5 Notice: Undefined offset: 5 in C:\thaiabc\apache2\htdocs\x.php on line 4
12
Notice <? $a = array(5,6,7); foreach($a as $b) { $c += $b; } echo $c; ?> Notice: Undefined variable: c in C:\thaiabc\apache2\htdocs\x.php on line 3 18
13
Warning <? a(5); function a($b,$c){ echo $b; } ?> Warning: Missing argument 2 for a(), called in C:\thaiabc\apache2\htdocs\x.php on line 2 and defined in C:\thaiabc\apache2\htdocs\x.php on line 3 5
14
Parse error <? $a ="1" $a = 1234; // decimal number $a = -123; // a negative number $a = 0123; // octal number (equivalent to 83 decimal) $a = 0x1A; // hexadecimal number (equivalent to 26 decimal) ?> Parse error: syntax error, unexpected T_VARIABLE in C:\thaiabc\apache2\htdocs\x.php on line 3 T_VARIABLE is a token in the interpreter's list.
15
Warning & Fatal error <? include(""); require(""); ?> Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.;C:\php5\pear') in C:\thaiabc\apache2\htdocs\x.php on line 2 Fatal error: require() [function.require]: Failed opening required '' (include_path='.;C:\php5\pear') in C:\thaiabc\apache2\htdocs\x.php on line 3
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.