Home > Article > Backend Development > PHP注释及与HTML混写
一、注释
View Code
<!DOCTYPE html><html><title>注释</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><body> <a href="../index.php">返回首页</a> <hr></hr><?php echo "/**/号注释<br/>"; /* *号注释 */ echo "#号注释<br/>"; # #号注释 echo "// 注释<br/>"; // // 注释?></body></html>
二、与HTML混写
<!DOCTYPE html><html><title>与HTML混写</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><body> <a href="../index.php">返回首页</a> <hr></hr>1.php标签<br/><?php echo '<B>与HTML混写1</B><br/>'; ?>2.php短标签<br/><? echo '<B>short Tag 与HTML混写2</B><br/>'; ?>3.php判断<br/><?phpif (true) {?> <strong>This is true.与HTML混写3</strong><?php} else {?> <strong>This is false.与HTML混写3</strong><?php}?> <br/>4.script language="php"<br/><script language="php"> echo 'script language=php 与HTML混写4<br/>';</script></body></html>