Python的文件上传代码
import web
import os
import time
class files:
def GET(self):
......
def POST(self):
inp = web.input()
uploaded = inp.fh
fname = inp.filename
if uploaded:
_fl = open( os.path.join(ssPath,
dlPath,
fname), 'w')
_fl.write( uploaded )
_fl.close()
raise web.redirect(....)
作者:wenhai_zhang 发表于2009-12-14 21:18:00 原文链接
阅读:57 评论:0 查看评论