Include and Require

Source: Internet
Author: User

The include or require statement takes all the Text/codde/markup this exists in the specified file and copies it into the File that uses the include statement.

The Include and require statements are identical, except upon failture:

  • Require would produce a fatal error and stop the script
  • Include would only produces a warning and the script would continue

So if you want the execution to go on and show users the output, even if the include file was missing, use the Include stat Ement. Otherwise, in case of the Framework or a complex PHP application coding, always use the Require statement to include a key fil E to the flow of exectution. This would help you avoid compromising your application's security and integrity, just in-case one key file is accidentally Missing.

Include/require ' filename '

Include and Require

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.