首页 >后端开发 >php教程 >PHP注释及与HTML混写

PHP注释及与HTML混写

WBOY
WBOY原创
2016-06-23 14:28:521016浏览

一、注释

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>

 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn