在线查找/正则替换文件中文本的网页接口(asp)
<%
response.Charset = "gb2312"
dim passText
passText = "xxyyaabb" '检验用的密码字符串
sub mygetfolder(ByVal path)
dim fp,fd
On Error Resume Next
set fp = fso.getFolder(path)
if Err.Number > 0 then
response.write(path & " <font color=red>获取目录句柄失败.终止页面:" & Err.description & "</font><br>")
response.end
else
response.write(path & " 获取目录句柄成功!<br>")
end if
On Error GoTo 0
if fp.name = request("bkFolder") then
response.write(path & " 备份文件夹中文件不必处理<br>")
exit sub
end if
response.write(path & "\ 正在处理...<br>")
dim newPath, newType, EName
newPath = ""
newType = ""
for each fd in fp.SubFolders
newPath = newPath & ",""" & replace(path, "\", "\\") & "\\" & fd.Name & """"
next
if newPath <> "" then
相关文档:
一、conn.asp
<%
'@Language="VBSCRIPT" CODEPAGE=65001
'meta http-equiv="Content-Type" content="text/html; charset=gb2312"
' 936 utf-8
class TDB
function qry(byval sqlquery)
& ......
代码如下:
Function RemoveHTML(strText)
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, "")
RemoveHTML = replace(RemoveHTML," "," ")
End Function
这是最基本的正则替换,有某些特殊字符还没过滤,可自行添加 ......
一、 环境设置
服务器端的环境设置从参考数据上看,微软系列的设置应该都行,即:
1.Win9x+PWS+Office
2.Win2000 Professional+PWS+Office
3.Win2000 Server+IIS+Office
目前笔者测试成功的环境是后二者。Office的版本没有特别需求,考虑到客户机设置的不确定性和下兼容特性,建议服务器端Of ......
一、 环境设置
服务器端的环境设置从参考数据上看,微软系列的设置应该都行,即:
1.Win9x+PWS+Office
2.Win2000 Professional+PWS+Office
3.Win2000 Server+IIS+Office
目前笔者测试成功的环境是后二者。Office的版本没有特别需求,考虑到客户机设置的不确定性和下兼容特性,建议服务器端Of ......
1.ASP对Excel的基本操作
(1) 建立Excel对象
创建Excel对象可以通过下面的代码来实现:
<%
set objExcelApp = CreateObject("Excel.Application")
objExcelApp.DisplayAlerts = false ’不显示警告
objExcelApp.Application = false ’不显示界面
%>
(2) 新建Exce ......