在HTML中嵌入php代码的几种风格
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> New Document </title>
</head>
<body>
<?php
echo '标准写法,类似xml写法'.'<br>';
echo '我后面的分号可以省略的,但是不推荐<br>'
?>
<script language="php">
echo'这是脚本风格的标记'.'<br>';
</script>
<?
//需要在php.ini 设置short _open_tag=on
echo "短标签的写法".'<br>';
?>
<%
//需要在 php.ini 配置文件中开启 asp_tags = on
echo "这是asp风格".'<br>';
%>
</body>
</html>
<?php
echo '当php后面没有非php代码,最后的结束标记可以省略!!';
#shell风格注释
//单行注释
/*
*我是多行注释
*/