PHP 脚本在服务器上执行,然后将纯 HTML 结果发送回浏览器。
PHP 脚本可以放在文档中的任何位置。
PHP 脚本以 <?php 开始,以 ?> 结束:
<?php // PHP code goes here ?>
<!DOCTYPE html> <html> <body><?php //This is a PHP comment line /* This is a PHP comment block */ ?> </body> </html> 运行代码
<!DOCTYPE html> <html> <body><?php //This is a PHP comment line /* This is a PHP comment block */ ?> </body> </html>