找不到VBScript运行时错误服务器映射路径

时间:2013-04-25 17:28:39

标签: asp-classic vbscript runtime-error mapserver

当我尝试从ASP应用程序中的表单发布请求时出现以下错误。

Microsoft VBScript运行时错误'800a004c'

未找到路径

/build-your-own-report/stjreport/includes/includes.inc,line 16

这是我的includes.inc文件

includes.inc

<%
    thisPage = Request.ServerVariables("SCRIPT_NAME")
    thisPage = Right(thisPageName,Len(thisPage) - InStrRev(thisPage,"/"))

    session.timeout = 5
    webDir = "/stjreport"
    pdf_path = server.MapPath("/") & webDir & "/pdfs"
    tmp_path = server.MapPath("/") & webDir & "/temp"

    Function RoundUp(n)
        roundUp = Int(n) - CBool(CDbl(n) <> CLng(n))
    End Function

    Sub cleanItUp(tt) 
        set incFS = server.createobject("scripting.FileSystemObject")
    /*line 16*/    set incFO = incFS.GetFolder(tmp_path)
        for each incF in incFO.files
            'if instr(1,incF.name,".pdf",1) > 0 then
                set tmpF = incFS.GetFile(incF)
                if DateDiff("s",tmpF.DateCreated,now) > tt then incFS.deleteFile(tmpF)
            'end if
        next
        set incFO = nothing
        set incFS = nothing
    End Sub

    Function makeRandomString(incLength)
        makeRandomString = ""
        seedStr = "1,N,O,P,Q,3,W,X,Y,Z,$,4,0,A,B,C,D,E,F,8,G,H,I,J,5,6,7,9,K,L,M,R,2,S,U,V,T,"
        rndAry = Split(seedStr,",")
        rndName = ""    
        For inc = 1 to incLength
            Randomize
            iRandom = Int( UBound( rndAry ) * Rnd )
            rndName = rndName & rndAry( iRandom )
        next
        makeRandomString = rndName
    End Function    

    Sub displayMessage  (incMsg,incReturnUrl)
        if Len(incMsg) > 0 then
            Response.write("<br /><br /><p style='text-align:center; font-family:arial; font_size:larger;'>" & incMsg & "</p>")
%>
<script language="javascript">
            alert("<%=Replace(Replace(incMsg,"<br />","\n"),"<br>","\n")%>");
<%
            if Len(incReturnUrl) > 0 then
%>                      
                top.location.href = "<%=incReturnUrl%>";
<%
            else
%>
                top.history.go(-1);
<%
            end if
%>                                                  
</script>
<%
            Response.end()
        end if                      
    End Sub             

    Function isPermittedFile(incFileType,incFile)   
        incFile = replace(incFile, "\", "/")
        if inStr(incFile,"/") > 0 then
            incAry = split(incFile,"/")
            incFile = incAry(uBound(incFile)-1)
        end if
        if inStr(incFile,".") = 0 then call (displayMessage("Image file: " & incFile & " sounds not to be a recognized image format",""))
        incFileAry = split(incFile,".")
        incExt = incFileAry(1)

        Select Case LCase(incFileType)
            Case "image"
                incAllowedStr = ",gif,png,jpg,jpeg,bmp,tiff,"
            Case "document"
                'incAllowedStr = ",pdf,doc,docx,txt,rtf,doc,docx,xls,xlsx,"
                incAllowedStr = ",pdf,"
        End Select
        isPermittedFile = False
        if inStr(1,incAllowedStr,","& LCase(incExt) &",",1) > 0 then isPermittedFile = True
    End Function

%>

0 个答案:

没有答案