web tools rank checker

domain .cn
.net .cn .com.cn
你正在阅览 :: 简体中文:: 学习 ASP SQL VB HTML code

学习 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在阅览 :: 简体中文 Chinese_Simplified

学习.主题:
首页
ASP
. Active-Server-Flash
. Array
. Connection
. Count
. Counter
. Distinct
. Email
. File
»Create
»delete
»File-obj-Count
»Move
»ReadAll-ReadLine
»Server.MapPath
. Folder
. Function
. GetSQLserver
. Header
. mySQL
. Record
. Recordset
. Request
. Response
. Server
. Server-CreateObject
. ServerVariables
. Session
. Special-Symbols
. String
. Sub
. Time
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
XML

SiteMap

3w....学习.教学 > ASP > file » server.mappath

3w learning

file >
server.mappath

Title:

Server.MapPath(Request.ServerVariables("PATH_INFO"))


Description:

for Each objFile in objFolder.Files whereimages=Server.MapPath("\image_folder\") read each file in objFSO.GetFolder(whereimages) same as Request.ServerVariables("APPL_PHYSICAL_PATH")&"image_file"


Example Code:

example 1: show all images in a folder <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>show image files</title> </head> <body> <% whereimages=Server.MapPath("\image_folder\") response.write whereimages &"<hr>" dim countI,objFSO,objFolder,objFile,objOpen countI=0 Set objFSO=Server.CreateObject("Scripting.FileSystemObject") Set objFolder=objFSO.GetFolder(whereimages) for Each objFile in objFolder.Files if countI<100 then if right(objFile,4)=".jpg" or right(objFile,4)=".gif" then countI=countI+1 if countI>0 then Response.Write countI&" : <img src=http://self_domain_com/image_folder/"& objFile.Name & ">" end if end if end if Next Set objOpen=nothing Set objFolder=nothing Set objFSO=nothing %> </body> </html> example 2: < %= server.mappath(Request.ServerVariables("PATH_INFO"))%>


Example Result:


1 image 2 image 3 image .......


..
...
...

[ 8/28/2008 ]

www learning school add more scripts and tips memo
You are at >>3WS.EZER.COM >> 3WS.EZER.COM/ASP/FILE/SERVER.MAPPATH.ASP>>ASP
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email