Home > Backend Development > PHP Tutorial > 解析php中heredoc的使用方法_php技巧

解析php中heredoc的使用方法_php技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-17 09:01:08
Original
1110 people have browsed it

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

如下:

复制代码 代码如下:

$name = '浅水游';
print


Untitled Document



Hello,$name!


EOT;
?>

1.浠
Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template