1 Nov
2001
1 Nov
'01
1:57 a.m.
hi all: I made a guest book, and i wish to write down every guest's IP address . here is my code, but i keep getting IP address 127.0.0.1 , whY??? can any one help me with this ? thanks in advance. python script code : ------------------------------------------------------ parameters:guest_name, comments, REQUEST --------------------------------------------------- id='msg_%d' % len(context.objectIds()) comments = comments + "\n\n" + "IP 地址:"+ REQUEST.REMOTE_ADDR # create the document context.manage_addProduct['OFSP'].manage_addDTMLDocument(id,title="", file=comments) # add a guest_name string property doc=getattr(context, id) doc.manage_addProperty('guest_name', guest_name, 'string')