大家好,我的apache和php配置好后,localhost不显示index.php的内容,而是显示根目录下的列表,但我输入localhost/phpinfo.php,却能显示内容,这是怎么回事呢,php都配置好了
loadmodule php5_module d:/program files/php5.2/php5apache2_2.dll
addtype application/x-httpd-php .php .do .action
addtype application/x-httpd-php .htm .html
phpinidir d:/program files/php5.2
directoryindex index.html index.php
回复讨论(解决方案) 不显示索引列表:
httpd.conf,找到目录段中这一行:
options indexes ......
去掉indexes,重启apache
你确定你跟目录下有放index.php文件吗?dir模块有加载么?
localhost/index.php 有内容执行么?
可以的话,可以将index.php提前
directoryindex index.php index.html
loadmodule env_module modules/mod_env.so