apache配置好后index.php只显示目录
                        
                            时间:2021-07-01 10:21:17
                            帮助过:23人阅读
							                        
                     
                    
                    大家好,我的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