<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
Sub WriteToTextFile (FileUrl,byval Str,CharSet) 
    set stm=server.CreateObject("adodb.stream")
    stm.Type=2 '以本模式读取
    stm.mode=3
    stm.charset=CharSet
    stm.open
        stm.WriteText str
    stm.SaveToFile server.MapPath(FileUrl),2 
    stm.flush
    stm.Close
    set stm=nothing
End Sub

   FileName = Request.QueryString("FileName")
   LeftMargin = request.form("LeftMargin")
   RightMargin = request.form("RightMargin")
   TopMargin = request.form("TopMargin")
   BottomMargin = request.form("BottomMargin")

  call WriteToTextFile(FileName, LeftMargin+","+RightMargin+","+TopMargin+","+BottomMargin,"utf-8")
  
   
%>

<body>
页面设置：<font color="green"><%=LeftMargin%></font>
<br>
文件名<%=FileName%>

</body>
</html>
