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

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

WBOY
WBOYOriginal
2016-06-02 11:28:201204browse

phphtmlapache

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

Statement:
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