日期:2010-08-09  浏览次数:21062 次

  用多了有问题,自己改吧。当前目录有可写权限!!!

<%@LANGUAGE="VBSCRIPT"%>

<%
if Request.Form("loadno")="yes" then                    '判斷是否表單提交

set myfileobject=server.createobject("scripting.filesystemobject")
       ' myfilepath=server.mappath("vod.asx")             '設寫文件路徑與文件名
myfilepath=server.mappath("vod.asx")
set mytextfile=myfileobject.createtextfile(myfilepath)

    ''''''''''''''''''''''''''''''''''''''      開始寫文件
     a="<asx version = " & chr(34) & "3.0" & chr(34) & ">"
    mytextfile.writeline(a)
    mytextfile.writeline(" <title>浏览器</title>")
dim x
   x=1
        dim y
        y=Request.Form("upcount")+1
        do while x < y                                             '循环寫播放文件
       if Request.Form("file" & x)<>"" then
        mytextfile.writeline("<entry>")
        b="<ref href = " & chr(34) & Request.Form("file" & x) & chr(34) & "/>"
        mytextfile.writeline(b)
        mytextfile.writeline("</entry>")
      end if
     x=x+1                                                     '循环寫播放文件結束
     loop

   mytextfile.writeline("</asx>")
'''''''''''''''''''''''''''''''''''''''''''''''''寫文件結束
mytextfile.close
'set myfileobject=nothing
msg="添加成功!"
end if
%>
<body bgcolor="#FFFFFF" text="#000000" background="../1_2.gif">
<script language="javascript">
  function setid()
  {
  str='<br>';
  if(!window.form1.upcount.value || window.form1.upcount.value < 1)
   window.form1.upcount.value=1;
    for(i=1;i<=window.form1.upcount.value;i++)
     str+='文件'+i+':<input type="file" name="file'+i+'" style="width:400"><br><br>';
  window.upid.innerHTML=str+'<br>';
  }
  </script>
<form name="form1" method="post" action="">
  <table width="1%" border="1" align="center">
    <tr> 
      <td width="91%"> 
        <div align="center"><b>网页片头播放文件设置</b></div>
      </td>
    </tr>
    <