2015-12-16 Study Notes

Source: Internet
Author: User

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:

  1. 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.
  2. Throw-this specifies how the exception is triggered. Each "throw" must correspond to at least one "catch"
  3. Catch-the "catch" code block catches an exception and creates an object that contains the exception information
  4. You can use multiple if: else code block, or a switch code block, or nested multiple exceptions

2015-12-16 Study Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.