1

我一直在尝试从源代码安装 Apache 和 PHP,以便它们一起工作,作为“看看我是否可以”项目。

但是,当我尝试加载“localhost”文件时,firefox 只是开始下载 .php 页面而不是打开它。

我很确定我在 ./conf/httpd.conf 中添加了正确的处理程序,它们如下所示

#configure for php
AddHandler php-script .php

AddType text/html .php
AddType application/x-httpd-php-source phps
AddType application/x-httpd-php5 .php

我也试过更换

AddType application/x-httpd-php5 .php

AddType application/x-httpd-php5 php

AddType application/x-httpd-php .php

AddType application/x-httpd-php php
4

1 回答 1

1

你有没有配置 apache 来加载 php 模块?看看这里: http ://www.petefreitag.com/item/516.cfm

于 2013-02-02T15:18:31.883 回答