php的heredoc施用小结

WBOY
Release: 2016-06-13 11:02:38
Original
809 people have browsed it

php的heredoc使用小结
Heredoc技术,在正规的PHP文档中和技术书籍中一般没有详细讲述,只是提到了这是一种Perl风格的字符串输出技术。但是现在的一些论坛程序,和部分文章系统,都巧妙的使用heredoc技术,来部分的实现了界面与代码的准分离

例如

<?php $name = '浅水游';print <<<EOT<html>  <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Untitled Document</title>   <!--12321--> Hello,$name!  
Copy after login
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!