【发布时间】:2017-05-12 14:21:51
【问题描述】:
我对 PHP 还很陌生,正在尝试为我的共同学习者创建一段社区学习代码来帮助他们,我想在 cmets 中提供一个编码技巧。我尝试编写以下内容:
# Tip -- when PHP is the only code in a file, don't put ?> at the end as this can cause bugs if white-space or additional PHP code is written to the end of the file after the file is initially created, after the ?>
但是,在注释中键入 ?> 会结束文件和注释。我该如何逃脱呢?我尝试使用\,但这似乎不起作用,并且还会混淆评论的意义。
这是怎么做到的?
【问题讨论】:
-
尝试使用多行注释,例如 /* */
-
我试一试...