当前位置:首页 > PHP教程 > PHP高级教程

php print EOF实现方法

我写段php代码如下:
复制代码 代码如下:

<?
if(test case)
print<<<eot
<....html code....>
eof;
else
print<<<eot
<....html code....>
eof;
?>

如上写法是不可以的,需要把eof标识符顶格:
复制代码 代码如下:

<?
if(test case)
print<<<eot
<....html code....>
eof;
else
print<<<eot
<....html code....>
eof;
?>


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!