In the PHP documentation, it just mentions that echo can output multiple lines of string (and the variables are automatically replaced) using the following command:
PHP code
Copy Code code as follows:
Echo <<<end
This uses the ' Here Document ' syntax to output
Multiple lines with $variable interpolation. Note
That's here, document Terminator must appear on a
Line with just a semicolon. No extra whitespace!
End;
The end terminator above can be set by itself, in Phpwind, using the "EOT" to finish. Note, however, that this end must be at the beginning of a line to be effective, which is actually a limitation of the Heredoc technology (because Heredoc can customize the terminator, so the problem is introduced), as mentioned below.
Phpwind template files are generally stored under the Templatewind directory, in the BBS directory, using the Require statement contains this template file. In fact, this template file is executed as part of the corresponding PHP file, so you do not need to do the template parsing as Phplib template, and then execute the process.
In order for Heredoc content to be properly identified by an editor such as Dreamweaver for "WYSIWYG" web design, you need to add annotations to the Heredoc, sample files as follows:
PHP code
Copy Code code as follows:
<!--
<?php
Print <<<eot
-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>untitled document</title>
<body>
<!--
$name = ' Shallow Water tour ';
Print <<<eot
-->
Hello, $name!
<!--
EOT
Print <<<eot
-->
</body>
<!--
EOT;
?>
-->
Such a template file, in fact, is a standard, can be executed PHP file. However, such PHP files, whose HTML style can be displayed correctly in Dreamweaver, all PHP code will be viewed as HTML annotations and will not be output when exported. For example, the above file is shown in Dreamweaver:
PHP code
Copy Code code as follows:
In this way, in the design of the page, we can use the visual interface of DW, to make some changes in the interface, landscaping and other work. While complete code and HTML separation is not implemented, at least one complementary design tool is provided.