Home > Backend Development > PHP Tutorial > phpwind download Summary of how to use template technology of php heredoc and phpwind

phpwind download Summary of how to use template technology of php heredoc and phpwind

WBOY
Release: 2016-07-29 08:37:42
Original
1181 people have browsed it

In the PHP documentation, it is only mentioned that echo can output multi-line strings using the following command (and the variables in it are automatically replaced):
PHP code

Copy code The code is as follows:


echo << ;END;


The END terminator above can be specified by yourself. In Phpwind, "EOT" is used to end it. However, it should be noted that this END must be at the beginning of a line to be valid. This is actually a limitation of Heredoc technology (because heredoc can customize the end character, this problem is introduced), which will be mentioned below.
phpwind template files are generally stored under the templatewind directory. In the BBS directory, use the require statement to include this template file. In fact, this template file is executed as part of the corresponding PHP file, so there is no need to parse the template and then execute it like PHPLib Template.
In order for the content of the heredoc to be correctly recognized by editors such as DreamWeaver to achieve "what you see is what you get" web design, comments need to be added to the heredoc. The sample file is as follows:

PHP code



Copy the code

The code is as follows:



Copy the code

The code is as follows:
Hello,$name! In this way, when designing the page, we can use the visual interface of DW to make some interface modifications and beautify it Waiting for work. Although it does not achieve complete separation of code and HTML, it at least provides an auxiliary design method. The above has introduced a summary of how to use the template technology of phpwind download, php heredoc and phpwind, including the content of phpwind download. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template