0

我需要以下帮助Error 800A000D - Type mismatch

<!-- #include file="Regex.asp" -->
<%
Call moverzipado()

Sub moverzipado()
    dim nomeArquivoZip, nomeArquivo 
    nomeArquivo = request("nomeArquivo")
    nomeArquivoZip = NomeArquivo(trim(CStr(nomeArquivo)))&".zip" 'here is the problem
End Sub

这是我的查询字符串:?nomeArquivo=arquivo.zip

这是 Regex.asp 包含的。这是工作。

<%
Function RegExResults(strTarget, strPattern)

    Set regEx = New RegExp
    regEx.Pattern = strPattern
    regEx.Global = true
    Set RegExResults = regEx.Execute(strTarget)
    Set regEx = Nothing

End Function

Function NomeArquivo(arquivo)
    Set arrResults = RegExResults(arquivo, "(.*)\..*")

    For each result in arrResults
        NomeArquivo = result.Submatches(0)
    Next

    Set arrResults = Nothing
End function

'Response.Write(NomeArquivo("file.exe")) prints "file" here it works.
%>

有人知道发生了什么吗?

4

1 回答 1

3

vbScript 不区分大小写。看来你有一个变量和一个函数实际上同名。尝试更改函数或变量的名称。

于 2013-05-14T23:34:04.847 回答