<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=新細明體 size=2><!--upload page--></FONT></DIV>
<DIV><FONT face=新細明體 size=2><form method="POST" <FONT
color=#ff0000>enctype="multipart/form-data"</FONT>
action="test.rpy"><BR>
<input type="file"
name="filename"><BR>
<input type="submit"><BR></form></FONT></DIV>
<DIV><FONT face=新細明體 size=2></FONT> </DIV>
<DIV><FONT face=新細明體 size=2>#rpy script</FONT></DIV>
<DIV><FONT face=新細明體 size=2>from twisted.web.resource import Resource<BR>class
test(Resource):<BR> def
render_POST(self,request):<BR>
f = open(<FONT
color=#ff0000>"/root/basic_daemon/htdocs/test/test.txt","wb"</FONT>) #absolute
path,the path must use chmod modify
authorization<BR>
f.write(request.args.get('filename')[0])</FONT></DIV>
<DIV><FONT face=新細明體 size=2>
f.close()<BR>
return "<html><body>" + 'success' +
"</body></html>"<BR>resource = test()</FONT></DIV>
<DIV><FONT face=新細明體 size=2></FONT> </DIV>
<DIV><FONT face=新細明體 size=2>----by Leon----</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt 新細明體">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt 新細明體; font-color: black"><B>From:</B>
<A title=iap_yeh@thecus.com href="mailto:iap_yeh@thecus.com">Iap, Singuan</A>
</DIV>
<DIV style="FONT: 10pt 新細明體"><B>To:</B> <A title=leon_lee@thecus.com
href="mailto:leon_lee@thecus.com">leon_lee@thecus.com</A> </DIV>
<DIV style="FONT: 10pt 新細明體"><B>Sent:</B> Monday, November 29, 2004 4:56
PM</DIV>
<DIV style="FONT: 10pt 新細明體"><B>Subject:</B> FW: [Twisted-Python] How to use
.rpy do upload ?</DIV>
<DIV><FONT face=新細明體 size=2></FONT><FONT face=新細明體 size=2></FONT><FONT
face=新細明體 size=2></FONT><BR></DIV>
<DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=標楷體
color=#0000ff size=4>If you got answer. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=標楷體
color=#0000ff size=4>Why not answer yourself onto the
post?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=標楷體
color=#0000ff size=4></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=標楷體
color=#0000ff size=4>singuan</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=zh-tw dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> <A
href="mailto:twisted-python-bounces@twistedmatrix.com">twisted-python-bounces@twistedmatrix.com</A>
[mailto:twisted-python-bounces@twistedmatrix.com] <B>On Behalf Of
</B>Leon<BR><B>Sent:</B> Monday, November 29, 2004 11:43 AM<BR><B>To:</B> <A
href="mailto:twisted-python@twistedmatrix.com">twisted-python@twistedmatrix.com</A><BR><B>Subject:</B>
[Twisted-Python] How to use .rpy do upload ?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2>I am a beginner,how can use .rpy do upload
???</FONT></DIV></BLOCKQUOTE></BODY></HTML>