PHP delimiter & lt; eof, and php delimiter eof

Source: Internet
Author: User

PHP delimiters <eof, and php delimiters eof

PHP is a Web programming language. In the programming process, it is inevitable that echo will be used to output large html and javascript scripts. If the traditional output method is used-output by string, there must be a large number of escape characters to escape special characters such as quotation marks in the string to avoid syntax errors. One or two parts can be tolerated, but if it is a complete html text or a 200-line JavaScript code, I think anyone will crash. This is why PHP introduces a separator-at least most of the reasons.


1. PHP delimiters act as they are, including the line feed format or something, and output something inside them;
2. Do not escape any special characters in the PHP delimiters;
3. the PHP variable in the PHP delimiter will be replaced with its value normally.

The format of the delimiters in PHP is as follows:

<Eof
......
Eof;

For example: <? Php $ js = <eof <script type = "text/javascript"> // top: redirects the entire frameset to the window. top. location. href = "$ group_url/Manager/login"; </script> eof; echo $ js;

 

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.