PHP learning (6) Includes code and embedded PHP

Source: Internet
Author: User
PHP learning (6) Includes code and embedded PHP including code in PHP. the code contains four functions, including include_once require require_once. The main difference between include and require is that if the file does not exist, The require function will throw a fatal error, while the include function will only throw a warning. Include include_once and require require_once, where the suffix "once" indicates that if the code already contains the file, the file will not be referenced again. There are four ways to embed PHP into HTML: XML, SGML, ASP, and script. ASP is not supported by default. you must modify asp_tags to On in the PHP configuration file [PHP. ini. Sample code for the four methods: 123456789101112 // XML format // SGML format // ASP form <% echo 'Hello, world'; %> // script form

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.