脚本宝典收集整理的这篇文章主要介绍了php – 需要将代码注释放在heredoc中,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
echo <<<_HEREDOC_FOO // okay this comment was intended to explain the code below but IT // is showing up on the web page HTML sent to the browser <form action="foo.PHP" method="post"> <input tyPE="submit" value="DELETE RECORD" /></form> _HEREDOC_FOO;
该表单是否有效,确定(顺便说一下上面的表单代码是高度截断的
为了我的问题,这里).
但是当时的评论(好吧这个评论是……布拉等等)
也出现在浏览器中.它显示在
浏览器如上所述:
// okay this comment was intended to explain the code below but it // is showing up on the web page HTML sent to the browser
关于评论划分的排列我尝试过:
// <-- // -->
和….
<-- // --> //
两种情况都失败,允许我在heredoc内发表评论.
echo <<<_HEREDOC_FOO text text text <<<_HEREDOC_FOO; //Comments echo <<<_HEREDOC_FOO text text text <<<_HEREDOC_FOO;
以上是脚本宝典为你收集整理的php – 需要将代码注释放在heredoc中全部内容,希望文章能够帮你解决php – 需要将代码注释放在heredoc中所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。