What does this mean? Solution

Source: Internet
Author: User
What does this mean? & Lt ;! -- EOT; if ($ ifmagic & amp; $ read [lou] = 0) {print & lt; EOT -- & gt; the above code is written in an html file. I would like to ask & lt ;! -- What does EOT mean? Is there such a syntax ?, What do I mean by writing like this without a post?

The above code is written in an html file. may I ask?


In this code, the above EOT should have the corresponding starting part. Next line if ($ ifmagic & $ read [lou] = 0) {print < ------ Solution --------------------
Are there other include or require files in your file?
------ Solution --------------------
Heredoc technology is generally not detailed in regular PHP documents and technical books. it only mentions that it is a Perl-style string output technology. However, some forum programs and some article systems use heredoc to partially implement the quasi-separation of interfaces and codes.

In the PHP document, we only mentioned that echo can use the following command to output multi-line strings (and the variables are automatically replaced ):
PHP code
Copy the code as follows:

Echo < This uses the "here document" syntax to output
Multiple lines with $ variable interpolation. Note
That the here document terminator must appear on
Line with just a semicolon. no extra whitespace!
END;

The above END Terminator can be defined by yourself, and "EOT" is used to END. However, it must be noted that this END can only be valid at the beginning of a row, which is actually a limitation of Heredoc technology (because heredoc can customize the Terminator, so this problem is introduced ).
To enable the heredoc content to be correctly recognized by an editor like DreamWeaver to implement the "what you see is what you get" webpage design, you need to add comments to heredoc. The example file is as follows:

PHP code
Copy the code as follows:





Untitled Document



Hello, $ name!





Such a template file is actually a standard PHP file that can be executed. However, the HTML style of such a PHP file can be correctly displayed in DreamWeaver. all PHP code will be seen as HTML comments and will not be output during output. For example, the above file is displayed in DreamWeaver as follows:
PHP code
Copy the code as follows:

Hello, $ name!

In this way, we can use the DW visual interface to modify and beautify the page. Although code and HTML are not completely separated, it provides at least an auxiliary design method.


In this way, we can use the DW visual interface to modify and beautify the page. Although code and HTML are not completely separated, it provides at least an auxiliary design method.

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.