V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  pc10201  ›  全部回复第 18 页 / 共 18 页
回复总数  342
1 ... 9  10  11  12  13  14  15  16  17  18  
2013-12-10 21:03:35 +08:00
回复了 pc10201 创建的主题 Python python bottle框架如何在windows下用static静态文件,如css,html等
我在程序目录中新建一个static目录,放入cs.txt文件
from bottle import static_file, route, run

@route('/')
def hello():
return 'test'

@route('/static/<filename>')
def server_static(filename):
return static_file(filename, root='./static')

run(host='localhost', port='8089')

已经弄好了,代码如上
2013-09-07 15:26:41 +08:00
回复了 jasonchao 创建的主题 问与答 瘦子如何有效的增重?
人参归脾丸,补中益气丸~
1 ... 9  10  11  12  13  14  15  16  17  18  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1068 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 18:41 · PVG 02:41 · LAX 10:41 · JFK 13:41
♥ Do have faith in what you're doing.