|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关.application|数组IfyoustoreanarrayinanApplicationobject,youshouldnotattempttoaltertheelementsofthestoredarraydirectly.Forexample,thefollowingscriptdoesnotwork:
<%Application("StoredArray")(3)="newvalue"%>
ThisisbecausetheApplicationobjectisimplementedasacollection.ThearrayelementStoredArray(3)doesnotreceivethenewvalue.Instead,thevaluewouldbeincludedintheApplicationobjectcollection,andwouldoverwriteanyinformationthathadpreviouslybeenstoredatthatlocation.
ItisstronglyrecommendedthatifyoustoreanarrayintheApplicationobject,youretrieveacopyofthearraybeforeretrievingorchanginganyoftheelementsofthearray.Whenyouaredonewiththearray,youshouldstorethearrayintheApplicationobjectagain,sothatanychangesyoumadearesaved.Thisisdemonstratedinthefollowingscripts.
---file1.asp---
<%
Creatingandinitializingthearray.
dimMyArray()
RedimMyArray(5)
MyArray(0)="hello"
MyArray(1)="someotherstring"
StoringthearrayintheApplicationobject.
Application.Lock
Application("StoredArray")=MyArray
Application.Unlock
Server.Transfer("file2.asp")
%>
---file2.asp---
<%
RetrievingthearrayfromtheApplicationObject
andmodifyingitssecondelement.
LocalArray=Application("StoredArray")
LocalArray(1)="there"
Printingoutthestring"hellothere."
Response.Write(LocalArray(0)&LocalArray(1))
Re-storingthearrayintheApplicationobject.
ThisoverwritesthevaluesinStoredArraywiththenewvalues.
Application.Lock
Application("StoredArray")=LocalArray
Application.Unlock
%>
</p>强大的可扩展性。ASP具有强大的扩展性,可以实现与多种网络、硬件设备的连接:通过专用的通讯线路远程接入企业;通过远程拨号服务器为远程拨号客户提供服务;通过WAP为移动电话互联网客户服务。 |
|