1, debugging and editing of the login and registration page, although it is only a simple four pages but because it is not particularly familiar with debugging for half a day to pass
The main learned mysqli_connect (' localhost ', ' user ', ' password ', ' dbname '); Instead of the previous mysql_connect and mysql_select_db, and so on.
Mysqli_query ("Set names ' GdK '"); Set Character Set
Like this alarm is usually missing parameters, you can check the corresponding function which parameters are necessary, although these alarms are not enough to affect the continued operation of the program, but strict is always good ~ ~ ~
2. Exception Handling for PHP
The correct processing procedure should include:
- Try-the function that uses the exception should be in the "try" code block. If no exception is triggered, the code will continue to execute as usual. However, if an exception is triggered, an exception is thrown.
- Throw-this specifies how the exception is triggered. Each "throw" must correspond to at least one "catch"
- Catch-the "catch" code block catches an exception and creates an object that contains the exception information
- You can use multiple if: else code block, or a switch code block, or nested multiple exceptions
2015-12-16 Study Notes