变态重口极致另类在线-波多久久夜色精品国产-波多野结衣在线观看一区-波多野结衣在线观看一区二区-污污的网站免费阅读-污污视频网址

當(dāng)前位置: 首頁IT技術(shù) → 關(guān)于asp隨機(jī)圖片顯示的實(shí)例代碼分享

關(guān)于asp隨機(jī)圖片顯示的實(shí)例代碼分享

更多
 下面提供給大家學(xué)習(xí)的是關(guān)于asp隨機(jī)圖片顯示的實(shí)例代碼分享,希望對(duì)大家有用。
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Function AllPath()
Dim Domain,GFilePath
Domain = Request.ServerVariables("SERVER_NAME")
GFilePath = Request.ServerVariables("PATH_INFO")
GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
AllPath = "http://"&Domain&GFilePath
End Function

Function ShowFileList(folderspec)
Dim Path,objFSO,objFolder,count,objFile,nume,S
Path = Server.MapPath(folderspec)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(Path) Then
Set objFolder = objFSO.GetFolder(Path)
count = 0
For Each objFile in objFolder.Files
count = count+1
Next
randomize
nume = Int((count*rnd)+1)
S = 0
ShowFileList = ""
For Each objFile in objFolder.Files
S = S + 1
If S = nume Then
ShowFileList = objFile.Name
Exit For
End If
Next
Set objFolder = Nothing
Else
ShowFileList = "NO"
End If
Set objFSO = Nothing
End Function

Dim list,filename,address,str

list = trim(Request.QueryString("list"))
if list = "" then
Response.write "本頁需要正確參數(shù)引入,您缺少相關(guān)的參數(shù)!正確格式如下:"&AllPath&"img.asp?list=圖片存放目錄"
Response.End()
end if

filename = ShowFileList("./"&list&"/")
if filename = "NO" then
Response.write "您指定的目錄<b>"&list&"</b>不存在,請(qǐng)重新指定!"
Response.End()
end if

if filename = "" then
Response.write "您指定的目錄<b>"&list&"</b>沒有相關(guān)的圖片文件存在,請(qǐng)重新指定!"
Response.End()
end if

str = right(filename,3)
if str<>"jpg" and str<>"gif" then
filename = "erro.gif"
end if

address = AllPath&list&"/"
address = address&filename
%>
<%Response.redirect(address)%>
熱門評(píng)論
最新評(píng)論
發(fā)表評(píng)論 查看所有評(píng)論(0)
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過審核才能顯示)
主站蜘蛛池模板: 深夜天堂| 怡红院免费全部视频在线视频 | 精品久久久久久中文字幕202o | 久久精品国产亚洲网站 | 亚洲性人人天天夜夜摸 | 国产新疆成人a一片在线观看 | 视频精品一区 | 色午夜视频 | 夜色在线影院 | 香蕉污视频在线观看 | 天天操天天插天天射 | 日本黄色一级片视频 | 国产一精品一av一免费爽爽 | 伦理片中文| 一级aaa级毛片午夜在线播放 | 最近更新中文字幕第一页 | 欧美人视频在线观看视频 | 亚洲欧美天堂 | 欧美一区二区影院 | 激情伊人 | 欧美高清在线精品一区二区不卡 | 天天摸日日舔 | 黄色录像a | 成人福利视频网 | 国产制服在线 | 亚洲精品三级 | 国产亚洲欧美在在线人成 | 亚洲福利区| 天天插天天射 | 日韩欧美网址 | 日韩欧美亚洲综合久久99e | 欧美一区二区在线视频 | 亚洲成人毛片 | 国产欧美精品一区二区三区–老狼 | gogo大胆全球裸xxxx | 天天干天天干天天干天天 | 一级毛片成人免费看免费不卡 | 亚洲另类图 | 99热.com| 日韩福利在线 | 日本三级2018亚洲视频 |