情况:为apache2.2配置php6
问题1. 打开localhost时,蹦出下载框,提示下载index.php
解决办法:
检查httpd.conf
1.设置默认文档:默认为DirectoryIndex index.html,修改添加index.php
2.添加以下选项
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "D:/PHP5-2-13"
注意空格不能多也不能少 这个往往是最后的原因
本文详细介绍了如何通过修改httpd.conf文件来解决在使用Apache2.2配置PHP6时遇到的问题,即当访问localhost时出现下载框提示下载index.php。解决方法包括设置默认文档、添加特定类型文件的处理方式以及指定PHPIni目录。
154

被折叠的 条评论
为什么被折叠?



