Home > Backend Development > PHP Tutorial > php代码嵌入在html中,正确解析不了

php代码嵌入在html中,正确解析不了

WBOY
Release: 2016-06-02 11:28:20
Original
1237 people have browsed it

phphtmlapache

我刚学php,已经搭建了Apache服务器,php也能正常显示。代码如下:
图片说明
执行完后,显示结果如下:
图片说明
查了资料说是,服务器搭建错误,解析不了php代码,我试着有该为如下:
图片说明
则执行结果正确,没有了后面的单引号等。
各位大神告一下,这是哪里配置错误了。
刚学php,多谢了。
我在htdocs下写了index.html
phpinfo();
?>
执行:localhost,显示正确。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template