默认是不会开启目录浏览的,想开启目录浏览如这个样子。我这里是用的apache2.4.39
如下
找到默认首页的位置,将DirectoryIndex index.php index.html error/index.html注释掉,并添加如下四行代码。再重启apache
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
allow from all
如下,就开启动目录浏览功能
Windows下新版phpstudy开启目录浏览功能也差不多。点击如下打开配置文件
如下进行修改既可以打开目录浏览功能。