我想列出目录和文件,例如
/Index
/Directories 1
1) File1.php
File2.php
File3.php
/Directories 2
1) File1.php
File2.php
File3.php
等等。
最佳答案
在您的服务器模块中添加以下内容
location / {
autoindex on;
}
,并删除行或注释
#index index.html index.php;
最后,重启你的 Nginx。
service nginx reload
关于php - 我如何使用 Nginx 列出目录及其文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22525769/