ASP 파일 과 디 렉 터 리 에 존재 하 는 함수 코드 를 검사 합 니 다.
두 함 수 는 모두 ASP 의 FileSystemObject 대상,즉 FSO 를 기반 으로 함수 로 작성 하여 나중에 사용 하기에 편리 합 니 다.
ASP 디 렉 터 리 에 존재 하 는 함수 코드 를 검사 합 니 다.
Function CheckDir(Byval FolderPath)
dim fso
folderpath=Server.MapPath(".")&"\"&folderpath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(FolderPath) then
'
CheckDir = True
Else
'
CheckDir = False
End if
Set fso = nothing
End Function
혹시
Function isExistFolder(Byval folderDir)
on error resume next
If objFso.FolderExists(server.MapPath(folderDir)) Then isExistFolder=True Else isExistFolder=False
if err then err.clear:isExistFolder=False
End Function
ASP 파일 에 존재 하 는 함수 코드 검사
Function CheckFile(Byval FilePath) '
Dim fso
Filepath=Server.MapPath(FilePath)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(FilePath) then
'
CheckFile = True
Else
'
CheckFile = False
End if
Set fso = nothing
End Function
혹시
Function isExistFile(Byval fileDir)
on error resume next
If (objFso.FileExists(server.MapPath(fileDir))) Then isExistFile=True Else isExistFile=False
if err then err.clear:isExistFile=False
End Function
다음은 다른 네티즌 의 보충
'==================================================
' : CheckFile
' :
' :FileName ------ :/swf/1.swf
' :False ---- True
'==================================================
Public Function CheckFile(FileName)
On Error Resume Next
Dim FsoObj
Set FsoObj = Server.CreateObject("Scripting.FileSystemObject")
If Not FsoObj.FileExists(Server.MapPath(FileName)) Then
CheckFile = False
Exit Function
End If
CheckFile = True:Set FsoObj = Nothing
End Function
ASP 에서 파일 과 디 렉 터 리 에 존재 하 는 함수 코드 를 검사 하 는 이 글 은 여기까지 소개 되 었 습 니 다.더 많은 asp 파일 에 내용 이 있 는 지 여 부 는 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 찾 아 보 세 요.앞으로 많은 지원 바 랍 니 다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Shadows: Spooktober in Answer Set ProgrammingASP can be viewed as an extension of Prolog. Pure Prolog rules are based on definite clauses, that is Horn clauses which...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.