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 << ;
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:
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.