PHP,全部环境没问题,能成功运行.php。可是在.html中嵌套了php代码后,没法解析输出,代码以下:php
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>first html + php</title> </head> <body> <?php echo 'This is my first html + php!'; ?> </body> </html>
解决方法:html
在httpd.conf中加入如下代码, 重启服务.htm
AddHandler php5-script .php .htmlip
AddType text/html .php .htmlit