1
vmebeh 2014 年 4 月 6 日
cd /d e:\www
python -m SimpleHTTPServer |
2
mdjhny 2014 年 4 月 6 日 http://gist.github.com/10006674.git
里面有一行path = os.getcwd(),这里可以改一下 |
3
icylogic 2014 年 4 月 7 日 via Android
它是把启动目录当根目录的,所以。。。cd ... && python ...
|
4
yakczh OP 找到一款nodejs写的
npm install http-server -g nodejs http-server . #当前目录做根目录 nodejs http-server e:\www #指定目录 这个对中文支持要好得多 SimpleHTTPServer 显示中文文件全是方块 |
5
baocaixiong 2014 年 4 月 7 日
|
6
xnh 2014 年 4 月 8 日
SimpleHTTPServer好像是默认设置的当前路径,如果你是linux的话可以先alias pythonhttp="python -m SimpleHTTPServer"
然后cd到你想设置为DocumentRoot的目录, 执行 pythonhttp 或 pythonhttp 想要的端口 就可以了 |