< % username=request("username") set rshot=server.CreateObject("adodb.recordset") sql="select * from TZ_all where username=’"&username&"’ order by id desc" rshot.open sql,conn,1,1 if not (rshot.eof and rshot.bof) then i=0 do while not rshot.eof line=line&" "&rshot("rl_time")&""&vbcrlf&"" line2=line2&" "&rshot("rl")&""&vbcrlf&"" i=i+1 rshot.movenext loop end if rshot.close set rshot=nothing
xmlfile=server.mappath("/party/amline/value_indicator/amline_rl_"&username&".xml") Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.CreateTextFile(xmlfile,True) MyFile.WriteLine("") MyFile.WriteLine("<chart>") MyFile.WriteLine(" ") MyFile.WriteLine line MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine line2 MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine("") MyFile.Close response.Redirect("m_my_bar.asp?username="&username&"") %> <% xmlfile=server.mappath("test1.xml") Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.CreateTextFile(xmlfile,True) MyFile.WriteLine("") MyFile.WriteLine("<chart>") MyFile.WriteLine(" ") MyFile.WriteLine(" 1997") MyFile.WriteLine(" 1997") MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine(" 50") MyFile.WriteLine(" 50") MyFile.WriteLine(" ") MyFile.WriteLine(" ") MyFile.WriteLine("") MyFile.Close %> < a href="test1.xml">查看XML文件内容 |