Here is a simple example from W3 Schools:
dim fs
strFilePath = "http://lanswinweb1/assembly/scrollingimages/images/" & Session("Num") & ".jpg"
'strFilePath = "P:AssemblyTeam Performance BoardsLDT Scrolling Monitor" & Session("Num") & ".jpg"
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(strFilePath) then
Session("Num") = Session("Num") + 1
response.write("File: " & strFilePath & " exists!")
else
response.write("File: " & strFilePath & " does not exist!")
end if
set fs=nothing
This is giving me:
Yet when I go to that link in the web address, it works:
So, what is it that I am missing or doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…