【问题标题】:How to see directory listing inside localhost?如何查看本地主机内的目录列表?
【发布时间】:2020-05-24 18:51:54
【问题描述】:

我使用python -m http.server 8000 为我的项目设置本地测试服务器。

当我的项目根目录有 index.html 文件时,然后在 http://localhost:8000/ 我会看到该 index.html 文件的内容,如下图所示。

但是当我的项目根目录没有index.html 文件时,在http://localhost:8000/ 我看到目录列表如下图所示。

所以我的问题是 即使我在项目的根目录下有 index.html 文件,是否有任何可能的方式来查看目录列表

【问题讨论】:

    标签: html networking directory localhost


    【解决方案1】:

    使用do_GET() 为我完成了这项工作。

    【讨论】:

      猜你喜欢
      • 2019-05-24
      • 1970-01-01
      • 2014-09-09
      • 2022-01-01
      • 2012-03-07
      • 1970-01-01
      • 2015-06-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多