日期:2011-10-05  浏览次数:20946 次

共有两个页面index.htm是首页.程序比较简单,主要是用了ASP里的文件操作对象。

 <!--index.htm---------------------->

 <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"
 "">
 <html>
 <head>
 <title>UntitledDocument</title>
 <metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
 </head>

 <body>
 <tablewidth="770"border="0"align="center"cellpadding="0"cellspacing="0">
 <tr>
   <td><formname="form1"method="post"action="send.asp">
     <tablewidth="100%" border="0"cellpadding="0"cellspacing="0"bgcolor="#CCFFFF">
       <tr>
         <tdheight="20"><divalign="center">发送消息</div></td>
         </tr>
       <tr>
         <td><divalign="center">
           <textareaname="msg"cols="100"rows="6"></textarea>
         </div></td>
         </tr>
       <tr>
         <td><divalign="center">
             <inputtype="submit"name="Submit"value="Submit">
             <inputtype="reset"name="Submit2"value="Reset">
         </div></td>
         </tr>
     </table>
   </form></td>
 </tr>
 </table>
 </body>
 </html>

'//send.asp

 <%
 functionchan_time(shijian)'转换日期时间函数
 s_year=year(shijian)
 iflen(s_year)=2thens_year="20"&s_year
 s_month=month(shijian)
 ifs_month<10thens_month="0"&s_month
 s_day=day(shijian)
 ifs_day<10thens_day="0"&s_day
 s_hour=hour(shijian)
 ifs_hour<10thens_hour="0"&s_hour
 s_minute=minute(shijian)
 ifs_minute<10thens_minute="0"&s_minute
 chan_time=s_year&s_month&s_day&s_hour&s_minute
 endfunction

 functionchan_data(shijian) '转换日期时间函数
 s_year=year(shijian)
 iflen(s_year)=2thens_year="20"&s_year
 s_month=month(shijian)
 ifs_month<10thens_month="0"&s_month
 s_day=day(shijian)
 ifs_day<10thens_day="0"&s_day
 chan_data=s_year&s_month&s_day
 endfunction

 functionchan_file(shijian)'转换日期时间函数
 s_month=month(shijian)
 ifs_month<10thens_month="0"&s_month
 s_day=day(shijian)
 ifs_day<10thens_day="0"&s_day
 s_hour=hour(shijian)
 ifs_hour<10thens_hour="0"&s_hour
 s_minute=minute(shijian)
 ifs_minute<10thens_minute="0"&s_minute
 s_ss=second(shijian)
 ifs_ss<10thens_ss="0"&s_ss
 chan_file=s_month&s_day&s_hour&s_minute&s_ss
 endfunction
 top="<html><head><title>news</title></head><body>"
 botom="</body></html>"
 msg=request.Form("msg")
 msg=replace(msg,vbcrlf,"")
 msg=replace(msg,chr(9),"")
 msg=replace(msg,""," ")
 msg=replace(msg,"\r\n","<