今天在开发过程中,想要在html中解析php,发现不是语法不正确,而是没有开apache的解析模块。
在Apache中开启步骤:
httpd.conf中添加两行代码:
AddType application/x-httpd-php .html .htm .php .phtml
AddType application/x-httpd-php-source .html .htm .phps
AddType application/x-httpd-php .html .htm
在html中解析php
最新推荐文章于 2023-08-30 08:03:08 发布