|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用cdonts,可以发送、查看邮件,实现webmail的功能。结合wsh,可以实现对nt主机的管理,如nt用户管理、iis虚拟主机设置、exchange邮箱设置等等,就像管理本地机一样方便。application|数组IfyoustoreanarrayinanApplicationobject,youshouldnotattempttoaltertheelementsofthestoredarraydirectly.Forexample,thefollowingscriptdoesnotwork:<br>
<br>
<%Application("StoredArray")(3)="newvalue"%><br>
<br>
ThisisbecausetheApplicationobjectisimplementedasacollection.ThearrayelementStoredArray(3)doesnotreceivethenewvalue.Instead,thevaluewouldbeincludedintheApplicationobjectcollection,andwouldoverwriteanyinformationthathadpreviouslybeenstoredatthatlocation.<br>
<br>
ItisstronglyrecommendedthatifyoustoreanarrayintheApplicationobject,youretrieveacopyofthearraybeforeretrievingorchanginganyoftheelementsofthearray.Whenyouaredonewiththearray,youshouldstorethearrayintheApplicationobjectagain,sothatanychangesyoumadearesaved.Thisisdemonstratedinthefollowingscripts.<br>
<br>
---file1.asp---<br>
<%<br>
Creatingandinitializingthearray.<br>
dimMyArray()<br>
RedimMyArray(5)<br>
MyArray(0)="hello"<br>
MyArray(1)="someotherstring"<br>
<br>
StoringthearrayintheApplicationobject.<br>
Application.Lock<br>
Application("StoredArray")=MyArray<br>
Application.Unlock<br>
<br>
Server.Transfer("file2.asp")<br>
%><br>
<br>
---file2.asp---<br>
<%<br>
RetrievingthearrayfromtheApplicationObject<br>
andmodifyingitssecondelement.<br>
LocalArray=Application("StoredArray")<br>
LocalArray(1)="there"<br>
<br>
Printingoutthestring"hellothere."<br>
Response.Write(LocalArray(0)&LocalArray(1))<br>
<br>
Re-storingthearrayintheApplicationobject.<br>
ThisoverwritesthevaluesinStoredArraywiththenewvalues.<br>
Application.Lock<br>
Application("StoredArray")=LocalArray<br>
Application.Unlock<br>
%><br>
<br>
</p>Windows本身的所有问题都会一成不变的也累加到了它的身上。安全性、稳定性、跨平台性都会因为与NT的捆绑而显现出来; |
|