aps下如何判断某个文件是否存在?????

newabby 2002-01-29 10:33:56
...全文
41 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
karma 2002-01-29
  • 打赏
  • 举报
回复

Function FileExist(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(filespec) Then
FileExist = TRUE
Else
FileExist = FALSE
End If
set fso=nothing
End Function


if FileExist(Server.MapPath("whatever.html")) then

end if
xuchu 2002-01-29
  • 打赏
  • 举报
回复
<%
dim CheckFileExist
dim CheckResult
Set CheckFileExist=Server.CreateObject("Scripting.FileSystemObject")
CheckResult=CheckFileExist.FileExists(Request("Path"))

if CheckResult then
Response.write "找到了!"
else
response.write "文件没有找到!"
end if
%>
Studio 2002-01-29
  • 打赏
  • 举报
回复
FileSystemObject组件啊

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧