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