如何退出html/php网页?

Sam*_*Sam 4 html php performance comments

一个疯狂的问题:

想象一个名为somepage.php And 的网页文件,它在我的编辑器中包含一些html php内容,我看到:

<html><head></head><body>  
<?=$welcome . $essay . $thatsAllForNowFolks . $footer ?>

<!--
Blue
Ball
Bell
Blow
Bows
Bats
Beef
Bark
Bill
Boss

-->
</body></html>
Run Code Online (Sandbox Code Playgroud)

当我浏览我的网站时,我在最终结果中看到了这些评论,而我只希望评论只出现在我的编辑器中,因为我的秘密灵感并且不希望全世界都知道我在开发时的想法,以及我看到任何和所有我的网站访客的评论作为互联网速度浪费的bandwitch.

在提供HTML时,如何对整个html/php文件进行解除?非常感谢您的想法,代码和建议.我提前感谢...

Mic*_*ter 14

可能最简单的解决方案是用PHP编写注释.这样它们就不会在源代码中发送给客户端.你可以这样做:

<html>

<?php
    //A single comment

    /*
         Some more
         comments
    */
?>

</html>
Run Code Online (Sandbox Code Playgroud)