<!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=&#26032;&#32048;&#26126;&#39636; size=2>&lt;!--upload page--&gt;</FONT></DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>&lt;form method="POST" <FONT 
color=#ff0000>enctype="multipart/form-data"</FONT> 
action="test.rpy"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;input type="file" 
name="filename"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;input type="submit"&gt;<BR>&lt;/form&gt;</FONT></DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>#rpy script</FONT></DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>from twisted.web.resource import Resource<BR>class 
test(Resource):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def 
render_POST(self,request):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
f = open(<FONT 
color=#ff0000>"/root/basic_daemon/htdocs/test/test.txt","wb"</FONT>) #absolute 
path,the path must use&nbsp;chmod modify 
authorization<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
f.write(request.args.get('filename')[0])</FONT></DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
f.close()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return "&lt;html&gt;&lt;body&gt;" + 'success' + 
"&lt;/body&gt;&lt;/html&gt;"<BR>resource = test()</FONT></DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; 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 &#26032;&#32048;&#26126;&#39636;">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt &#26032;&#32048;&#26126;&#39636;; 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 &#26032;&#32048;&#26126;&#39636;"><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 &#26032;&#32048;&#26126;&#39636;"><B>Sent:</B> Monday, November 29, 2004 4:56 
  PM</DIV>
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;"><B>Subject:</B> FW: [Twisted-Python] How to use 
  .rpy do upload ?</DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT><FONT 
  face=&#26032;&#32048;&#26126;&#39636; size=2></FONT><BR></DIV>
  <DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=&#27161;&#26999;&#39636; 
  color=#0000ff size=4>If you got answer. </FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=&#27161;&#26999;&#39636; 
  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=&#27161;&#26999;&#39636; 
  color=#0000ff size=4></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=768255508-29112004><FONT face=&#27161;&#26999;&#39636; 
  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&nbsp; am a beginner,how can use .rpy do upload 
  ???</FONT></DIV></BLOCKQUOTE></BODY></HTML>