⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readword.asp

📁 办公软件之间的数据交换,可以把WORD文件和EXCEL文件中的数据添加到WEB服务器,也可以从WEB服务器中下载数据到本地电脑.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
   <%
  ffname1=request.form("ffname")
   filepath="up\updown\"&ffname1
 ' response.write filepath
  
  
    set newconn=server.createobject("adodb.connection")
	set rs=server.createobject("adodb.recordset")
	DBPath = Server.MapPath("#ctm wish.mdb")
	newconn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
	sqlcmd="select * from student_info "
	rs.Open sqlcmd,newconn,1,2
	
   Dim fso,fso1, MyFile,myfile1
   Set fso = CreateObject("Scripting.FileSystemObject")
   'Set MyFile = fso.openTextFile(server.MapPath(filepath), 1,false)
   Set MyFile = fso.openTextFile(server.MapPath(filepath), 1,false)

    public namearray
  do while not myfile.atendofstream
 	   aa=myfile.readline  
          response.write  aa    
       hname=replace(aa,"    "," ")    '用一个空格替换四个空格
       hname=replace(hname,"  "," ")   '用一个空格替换三个空格
       hname=replace(hname,"  "," ")   '用一个空格替换二个空格
      
        response.write pname
        response.write "<br>"
       namearray=split(hname," ")
        max=ubound(namearray)
     
                 rs.addnew
		 rs(1)=namearray(0)
		 rs(2)=namearray(1)
		 rs(3)=namearray(2)
		 rs(4)=namearray(3)
		 rs(5)=namearray(4)
		 rs(6)=namearray(5)
		 rs.update

   


loop

response.Redirect("11.asp")

   %>

</head>

<body>
<a href="index.asp">返回主页</a>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -