在指定目錄下,執(zhí)行
python -m SimpleHTTPServer 8080 # python2
python3 -m http.server 8080 # python3
8080指瀏覽器端口,可以自己更改
成功后,在瀏覽器輸入 ip+端口即可訪問
本機(jī)端口0.0.0.0或者127.0.0.1
在指定目錄下,執(zhí)行
python -m SimpleHTTPServer 8080 # python2
python3 -m http.server 8080 # python3
8080指瀏覽器端口,可以自己更改
成功后,在瀏覽器輸入 ip+端口即可訪問
本機(jī)端口0.0.0.0或者127.0.0.1