当前位置:主页 > 软件编程 > PHP代码 >

php print EOF实现方法

时间:2021-08-03 08:57:35 | 栏目:PHP代码 | 点击:

我写段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;
?>

您可能感兴趣的文章:

相关文章