ASP中怎样判断某一路径下是否存在某个文件?

ASP中怎样判断某一路径下是否存在某个文件?,第1张

<%

Set fso = CreateObject("Scripting.FileSystemObject")

if fso.fileexists(server.mappath("扒孙斗AA/ss.jpg")) then

response.write "<凯纯img src=aa/ss.jpg />"

else

response.write"春磨<img src=aa/12.jpg />"

end if

Set fso = nothing

%>

这一句有问题:

sMapFileName = Server.MapPath("uploadfile\rst(0)")

这一句应该这样汪厅御写:

sMapFileName = Server.MapPath("uploadfile/"&rst(0))

还有,应该是rst("字段名"),字困岩段名应该用引号引起来,所以呢,最终我认为应该这样写:

sMapFileName = Server.MapPath("uploadfile/"伏桥&rst("0"))

在ASP里面路径应该用"/"而不是"\"


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/8153545.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-13
下一篇 2023-04-13

发表评论

登录后才能评论

评论列表(0条)

保存