答案 0 :(得分:3)
看看@ how to prevent directory access and show forbidden error in php
使用
添加.htaccess文件# disable directory browsing
Options -Indexes
答案 1 :(得分:1)
有很多方法可以做到这一点 - a)apache vhost fole b).htaccess
如果你想跟随(b),请在.htaccess中进行以下操作
Options -Indexes
由于