ASP MapPath ·½·¨
http://www.w3school.com.cn/asp/met_mappath.asp
¶¨ÒåºÍÓ÷¨
MapPath ·½·¨¿É°ÑÖ¸¶¨µÄ·¾¶Ó°Éäµ½·þÎñÆ÷ÉÏÏàÓ¦µÄÎïÀí·¾¶ÉÏ¡£
×¢ÊÍ£º´Ë·½·¨²»ÄÜÓÃÓÚ Session.OnEnd ºÍ Application.OnEnd ÖС£
ʵÀý
ʵÀý 1
¾ÙÀý£¬Îļþ test.asp λÓÚ C:\Inetpub\wwwroot\Script¡£
Îļþ Test.asp (λÓÚ C:\Inetpub\wwwroot\Script) °üº¬ÏÂÁдúÂ룺
<%
response.write(Server.MapPath("test.asp") & "<br />")
response.write(Server.MapPath("script/test.asp") & "<br />")
response.write(Server.MapPath("/script/test.asp") & "<br />")
response.write(Server.MapPath("\script") & "<br />")
response.write(Server.MapPath("/") & "<br />")
response.write(Server.MapPath("\") & "<br />")
%>
Êä³ö
c:\inetpub\wwwroot\script\test.asp
c:\inetpub\wwwroot\script\script\test.asp
c:\inetpub\wwwroot\script\test.asp
c:\inetpub\wwwroot\script
c:\inetpub\wwwroot
c:\inetpub\wwwroot
Àý×Ó 2
ÈçºÎʹÓÃÒ»¸öÏà¶Ô·¾¶À´·µ»Øµ½´ïÕýÔÚä¯ÀÀÆ÷Öв鿴µÄÒ³ÃæµÄÏà¶ÔÎïÀí·¾¶£º
<%
response.write(Server.MapPath("../"))
%>
»òÕß
<%
response.write(Server.MapPath("..\"))
%>
Ïà¹ØÎĵµ£º
5¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——Á¢Ìå±ýͼ
<%dim total(7,1)
total(1,0)="Öйú¾Óª±¨"
total(2,0)="ÕÐÆ¸Íø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5, ......
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚasp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃæ£¬È»ºó½«ÎļþµØÖ·Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬t·Ö¸ôµÄÊý¾Ý£¬µ¼³öexeclʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬nµÈ¼ÛÓÚ»»ÐС£
1¡¢½«Õû¸öhtmlÈ«²¿Êä³öexecl
´Ë·¨½«htmlÖÐËùÓеÄÄÚ ......
Array()
¡¡¡¡FUNCTION: ·µ»ØÒ»¸öÊý×é
¡¡¡¡SYNTAX: Array(list)
¡¡¡¡ARGUMENTS: ×Ö·û£¬Êý×Ö¾ù¿É
¡¡¡¡EXAMPLE: <%
¡¡¡¡Dim myArray()
¡¡¡¡For i = 1 to 7
¡¡¡¡Redim Preserve myArray(i)
¡¡¡¡myArray(i) = WeekdayName(i)
¡¡¡¡Next
¡¡¡¡%[/IMG]
¡¡¡¡RESULT: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËØµÄÊý×émyArray
¡ ......
<style type="text/css">
.container, .container *{margin:0; padding:0;}
.container{width:325px; height:287px; overflow:hidden;position:relative; margin-left:5px; margin-top:6px;}
.slider{position:absolute;}
.slider li{ list-style:none;display:inline;}
.slider img{ width:325px; height:287p ......
´ó¼ÒÓÐÅöµ½¹ýÒªÏëȡһ×Ö·û´®ÀïµÄijЩֵ¶øÎÞ´ÓÏÂÊÖ£¿ÓÐûÓоõµÃ¿´Êé»ò½Ì²Ä¶ÔsplitµÄд·¨ºýÀïºýÍ¿……Èç¹ûÓдËÒÉÎʵϰ£¬Çë¿´ÏÂÃæÎÒ¶ÔÀý×ӵĽâÊÍ£¬ÏàÐÅÄú»á¶ÔÕâ¸öÓÐÒ»¶¨µÄÁ˽⡣
ÎÒÏȽéÉÜÒ»ÏÂSplitº¯ÊýµÄÓ÷¨:
·µ»ØÖµÊý×é = Split("×Ö·û´®","·Ö¸î·û")
¼ÙÉè±äÁ¿strURL±£´æ×ÅURLÖµ£¬ÈçstrURL = "ftp://username ......