有时我们需要使用文件URL链接的方式读取文件,测试时要么用非结构化平台,要么就得将本地资源进行映射
激活pyhton环境,进入资源目录,运行:python3 -m http.server [PORT]
python3 -m http.server [PORT]
如:python3 -m http.server 10120
python3 -m http.server 10120
输出: Serving HTTP on 0.0.0.0 port 10120 (http://0.0.0.0:10120/) ...
Serving HTTP on 0.0.0.0 port 10120 (http://0.0.0.0:10120/) ...