(1) Error handling concepts
In the production environment (ie public Network) to others to visit the website, mobile website, mobile phone interface. If the error shows up, it's easy to expose
1. server file path and file storage specification
2. Some people like to be named after a personal name, through social engineering can reverse the reasoning of the password
3. mysql database server addresses are sometimes exposed
This code, for example, exposes the server-side file storage path, frame information, and so on without semicolons
1 <? PHP 2 $fp fopen (' Test.txt ', ' A + ') 3 fwrite ($fp, ' I am a new addition '); 4 fclose ($p); 5 ?>
The above code is to open the Test.txt file in Append mode, add ' I am the new ' character, and then close. Because here my first line is less added;
Parse Error: syntax error, 10th line of C: \ appserv \ www \ index.php unexpected ' fwrite ' (t_string)
Then learn how to mask the error below
(2)
(Lone solitary Nine swords)--php Video Learning-Error handling