|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我想详细了解ASP整站代码与PSP整站代码有什么优缺点,那个更好,更安全,更用容易维护,和管理。。。EverwanttoknowhowtodisplaythecontentsofatextdocumentusingASP.Hereisaeasywaytoread
fromatextfile
<!--StartofASPCode---->
<%
byJamesSeymour,http://jamesdot.org
Dimwrite
DimfileSysObj,tf,read
Readtheread.txt
StorethefilenamewheretheInformationisstoredintoavariablecalledread
read="read.txt"
Retrievethefullpathofthereadfile
read=LEFT(Server.Mappath(Request.ServerVariables("PATH_INFO")),InStrRev(Server.Mappath
(Request.ServerVariables("PATH_INFO")),""))&read
CreateaninstanceofFileSystemObjectandstoreitintoavariablecalledfileSysObj
SetfileSysObj=createObject("Scripting.FileSystemObject")
Checkwhetherthereadfileexists
IF(fileSysObj.FileExists(read))Then
ifthefileexists,thenopenitforreading
Settf=filesysobj.OpenTextFile(read,1)
read=tf.ReadLine
tf.Close
ELSE
ifyoucantfindread.text,displaydefaultmessage
read="Icantfindthefileread.txt!Sothisismydefaultmessage."
ENDIF
%>
tablethedisplaystheread.txtfile
<divalign="center">
<center>
<tableborder="0"width="40%"cellspacing="0"cellpadding="0">
<tr>
<tdwidth="100%"bgcolor="#EEEECC"><B><%=read%></B>
</td>
</tr>
<tr>
<tdwidth="100%">
<!--EndoftheASP-->
usethecodeabove,clickanddragyourmouseoverthecodetohighlightit.Thenrightclickonthe
highlightedcodeandclick"Copy."Nowyoumaypasteitintoyourcodeeditor.
</p>国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了 |
|