httpd php不解析的解决办法:首先找到“AddType application/x-gzip .gz .tgz”;然后添加内容为“AddType application/x-httpd-php .php”并保存即可。

推荐:《PHP视频教程》
apache 不解析php
对apache的参数,还是不够理解。
1.找到:
AddType application/x-gzip .gz .tgz
在其下面添加:
AddType application/x-httpd-php .php //添加支持对php脚本解析
2. 找到:
使用官方Model Context Protocol PHP SDK将PHP应用程序功能暴露为MCP工具、资源和提示,用于代理工作流。
<ifmodule> DirectoryIndex index.html </ifmodule>
把中间那一行改为:
DirectoryIndex index.html index.htm index.php //增加对php的索引
正常了。
另外,PHP编译的时候,要调用apache这个模块, --with-apxs2=/usr/local/apache2/bin/apxs
php免费学习视频:立即使用
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!










