hoxide
hoxide_dirac at yahoo.com.cn
Thu Aug 12 02:13:46 EDT 2004
hoxide,ÄúºÃ£¡ The problem was sloved. It needn't use FieldStorage. Publisher Handler was parsed form data before calling the method, so FieldStorage would never got the data. ======= 2004-08-12 00:22:01 ÄúÔÚÀ´ÐÅÖÐдµÀ£º======= >I'm trying to access the form data with FieldStorage class, but after I submited the form, >it didn't get any data. > >in the html: ><form enctype="multipart/form-data" name="form1" id="form1" method="POST" action="/bin/admin/addimg"> > <input type="text" name="tb" id= "tb"/> > <textarea name="textarea">jjkjkjijkj</textarea> > <input type="file" name="file" /> > <input type="submit" name="submit" value="submit" /> ></form> > >in the python source: > >def addimg(req): > field = util.FieldStorage(req,1,1) > req.write(dir(field).__str__()) > req.write(repr(field.list)) > for f in field.list: > req.write(str(f)) > return > >the apache config: ><VirtualHost *:8088> > ServerAdmin webmaster at yey_python.com > DocumentRoot "h:/webroot/yey_python" > ServerName www.yey_python.edu > ErrorLog logs/dummy-host.example.com-error_log > CustomLog logs/dummy-host.example.com-access_log common > AddDefaultCharset gb2312 ></VirtualHost> ><Directory "H:/webroot/yey_python/bin"> > SetHandler mod_python > PythonHandler mod_python.publisher > PythonAutoReload On > PythonDebug On > PythonPath "sys.path+['H:/webroot/yey_python/bin']" > > AllowOverride None > Order allow,deny > Allow from all > DefaultType text/html ></Directory> > > >PS:I'm chinese, and sory for you with my poor English. > >¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡hoxide >¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡hoxide_dirac at yahoo.com.cn >¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-08-12 > >_______________________________________________ >Mod_python mailing list >Mod_python at modpython.org >http://mailman.modpython.org/mailman/listinfo/mod_python = = = = = = = = = = = = = = = = = = = = ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Ö Àñ£¡ ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡hoxide ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡hoxide_dirac at yahoo.com.cn ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-08-12
|