PHP require and include differences

Source: Internet
Author: User

Require is used in the following way: Require ("myfile.php"), this statement is usually placed at the front of the PHP script. Before the PHP program executes, it will read into the file introduced by the Require () statement, making it part of the php script file. Include uses the same way as require: include ("myfile.php"), which is typically placed in the Process Control section. The php script file is read into the include () statement before the file it contains. This way, you can simplify the process of executing the program.

  • Incluce load when used
  • Require is loaded at the beginning
  • The _once suffix indicates that the load is not loaded

PHP require and include differences

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.