配置Easyphp将htm文件作为php处理

发布于 2024-07-23 06:01:29 字数 295 浏览 5 评论 0原文

在我的远程服务器上,我正在使用线路
AddType application/x-httpd-php .php .htm .html
解析带有 htm/html 扩展名的文件中的 php
如何在运行 EasyPHP 的本地计算机上复制此行为。
我尝试将同一行添加到 Apache/conf/httpd.conf 并重新启动服务器,但文件显示为 html 文件,而没有运行 php 代码。

各种 googles/php docs/stack/easyphp 文档搜索都没有帮助。

On my remote server I'm using the line
AddType application/x-httpd-php .php .htm .html
to parse the php in files with htm/html extensions
How can I replicate this behaviour on my local machine running EasyPHP.
I have tried adding the same line to Apache/conf/httpd.conf and restarting the server, but the files are displayed as html files, without the php code running.

Various googles/php docs/stack/easyphp doc searches have failed to help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼睛会笑 2024-07-30 06:01:29

您需要在conf_files/httpd.conf中添加相同的行
因为每次启动服务器时都会重新生成 apache/conf/httpd.conf 。

you need to add the same line in the conf_files/httpd.conf
since the apache/conf/httpd.conf is regenerate each time you start your server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文