PHP 语法

PHP 脚本在服务器上执行,然后将纯 HTML 结果发送回浏览器。

基本的 PHP 语法

PHP 脚本可以放在文档中的任何位置。

PHP 脚本以 <?php 开始,以 ?> 结束:

<?php
// PHP code goes here
?>

PHP 中的注释

实例

 <!DOCTYPE html>
<html>
<body>

<?php
//This is a PHP comment line

/*
This is
a PHP comment
block
*/
?>


</body>
</html>