PHP include any file or URL introduction _php tutorial

Source: Internet
Author: User
Practice out the truth, write a simple file PHP file include a JS file, after executing no error or warning message, while seeing the content of the file containing JS is printed out. Therefore, it concludes that the include target file can be any type.

Now look back at the official document of the include, which has the phrase: "When a file is included, the parser goes out of PHP mode at the beginning of the target file and enters HTML mode and resumes at the end of the file. For this reason, any code in the destination file that needs to be executed as PHP code must be included in the valid PHP start and end tags. "Note that the HTML schema mentioned in the PHP code must be included in a valid PHP tag", to carefully understand its meaning, it is implicitly explained that the include can be any type of file.

In addition, after 4.3.0, the include target file can also be a URL, if you need to set allow_url_include to on in the configuration.

http://www.bkjia.com/PHPjc/762614.html www.bkjia.com true http://www.bkjia.com/PHPjc/762614.html techarticle practice out the truth, write a simple file PHP file include a JS file, after executing no error or warning message, while seeing the content of the file containing JS is printed out. It is therefore concluded that ...

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