asp生成xml文件
2015-11-24 11:56
661 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!--#include file = "../manage.asp"--> <!--#include file="../include/ado.asp"--> <html> <head> <title></title> <meta name="description" content=""> <meta name="keywords" content=""> <link href="/style.css" rel="stylesheet" type="text/css"> <script language=javascript src="/include/wpCalendar.js"></script> <script> </script> </head> <body> <% dtime= DateDiff("s",cdate("1970-1-1 00:00:00"),now()) '获取当前时间和1970年1月1日间的秒数 Dim rs,sql Set rs = server.CreateObject("adodb.recordset") sql = " select a.phone,b.mode,c.sectionno, case when a.last4 = 1 then '不含4' when a.last4 = 2 then '含4' else '全部' end last, d.name ckName, case when a.isSended = 1 then '已分配' else '未分配' end issended, case when a.isOpen = 1 then '已开通' else '未开通' end isopen, a.id from gc_goodPhone a, gc_numberMode b, gc_sectionno c, gc_ck d where a.modeid = b.id and a.sectionnoid = c.id and a.unitid = "&session("unitid")&" and a.ck_id = d.id " rs.open sql, conn, 1, 2 i = 1 xmlfile=server.mappath(dtime&".xml") Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.CreateTextFile(xmlfile,True) MyFile.WriteLine("<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' decimals='0' formatNumberScale='0'>") If rs.recordcount > 0 Then For i= 1 To rs.RecordCount If Not rs.eof Then MyFile.WriteLine(" <set label='Jan"&i&"' value='462'/>") End If If Not rs.eof Then rs.movenext End If Next End If MyFile.WriteLine("</chart>") MyFile.Close %> </body> </html>
相关文章推荐
- 电商安全无小事,如何有效地抵御 CSRF 攻击?
- 再看 AspriseOCR - OCR应用开发
- 电商安全无小事,如何有效地抵御 CSRF 攻击?
- Asp.Net 之 调用远程Web_Service
- Asp.Net 之 获取GridView行的DataKeys
- ASP.NET中RouteValueDictionary的一点理解
- ASP.NET中怎样实现图片验证码功能,并且点击图片会刷新
- asp.net内置对象 Response对象使用介绍
- ASP.NET MVC 开源项目学习之ProDinner (二)
- aspx.cs上传文件
- Using OpenCV with the Raspberry Pi camera
- asp.net和js读取文件的MD5值的方法
- ASP.NET配置KindEditor文本编辑器
- ASP.NET动态网站制作(29)-- 正则
- ASP.NET 5 使用 TestServer 进行单元测试
- URL路径中包含特殊字符%的处理
- ASP.NET静态页生成方法(模板替换)
- ASP.NET获取用户端的真实IP
- ASP.NET 5升级后如何删除旧版本的DNX
- asp.net SessionState模式的配置及使用