我正在尝试安装phpldapadmin。我已经安装了代码并将其放在apache的文档目录中,还将php5模块加载到apache config中,并添加了以下目录指令。
<Directory "/usr/local/www/apache22/data/phpldapadmin/htdocs">
DirectoryIndex index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
AddType application/x-httpd-php .php
</Directory>然而,当我将浏览器导航到这里时,它只显示了来自index.php的php代码,任何帮助都将不胜感激。
添加了一行AddType应用程序/x-httpd-php .php,但没有任何效果。还重新启动了服务器。
发布于 2011-06-01 12:13:43
在PHP:AddType application/x-httpd-php .php .phtml中添加下面这一行,这将使您的<Directory></Directory>脚本由AddType application/x-httpd-php .php .phtml解释器执行。
(并记住重新启动服务器。如果您不知道如何重新启动计算机,请重新启动)
http://www.php.net/manual/en/install.unix.apache.php
发布于 2011-06-01 12:13:07
尝试重新启动服务器以使配置文件更改生效。
https://stackoverflow.com/questions/6196175
复制相似问题