The difference between PHP include and require

Source: Internet
Author: User
Tonight we'll talk about the difference between the include () and require () in PHP system functions, which we often use, usually normal, when they

Area Do not show up, but once an accident occurs, immediately the difference appears, let us say in detail below.

Include (): From the English speaking, is included in the meaning, often used in a page to introduce a file or contain another page, when the introduction of the file

No Is present, the system will prompt an error, but the program will continue to execute . ;

Require (): literally, is required or required meaning, also often used to introduce a file page, but when the file does not exist, the process

Order It's not going to work anymore, will terminate execution .

I believe that we will never have doubts about these two methods, very simple, good, share to this end, useful on the reward , thank you!

The above introduces the difference between PHP include and require, including the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.