搜索列表
-
如何利用当前时间生成随机函数?
【编程10000问】quote.asp<%Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject")Set MyTextFile = MyFileObj.OpenTextFile("c:\quote.txt")' 设置好路径.IF NOT MyTextFile.AtEndOfStream THENheader = CInt(MyTextFile.ReadLine)' 读表头.END IFRANDOMIZE' 生成...
|如何|何利|利用|用当|当前|前时|时间|间生|生成|成随|随机|机函|函数|数?|?| -
如何对文件进行操作?
【编程10000问】<%@ LANGUAGE="VBScript" %><% 'Set file i/o constants. Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 filename = "test.txt" path = Server.MapPath("data") & "\" & filename ' 映射...
|如何|何对|对文|文件|件进|进行|行操|操作|作?|?| -
如何显示一个文本文件?
【编程10000问】 Write(StrING) WriteLine(StrING) WriteBlankLines(LINES) 〈html〉 〈head〉 〈http-equiv="Content-Type" content="text/html; charset=gb2312"〉 〈title〉春风精彩之文本文件显示〈/title〉 〈/head〉 〈body〉 <%...
|如何|何显|显示|示一|一个|个文|文本|本文|文件|件?|?| -
如何读取文本文件的内容?
【编程10000问】<%Dim writeDim fileSysObj, tf, readread = "intels.txt"' 读取intels.txt. read = LEFT(Server.Mappath(Request.ServerVariables("PATH_INFO")), InStrRev(Server.Mappath(Request.ServerVariables("PATH_INFO")), "\")) & read' 检索要读的文件的完整路径.Set fileSysOb...
|如何|何读|读取|取文|文本|本文|文件|件的|的内|内容|容?|?| -
如何一行行地读取文件?
【编程10000问】dim input(30) ' 定义一个数组,大小可随时更改.这里为了显示方便.file_path=Server.Mappath("index.html")Set fs=Server.CreateObject("Scripting.FileSystemObject")Set file_open=fs.OpenTextFile(file_path)n=0Do While Not file_open.AtEndOfStreamn=n+1fileline=file_open.readlineinput(i)=file...
|如何|何一|一行|行行|行地|地读|读取|取文|文件|件?|?| -
如何实现全文检索?
【编程10000问】<%@ LANGUAGE="VBscript" %> <html> <head> <meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0"> <meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312-80"> <title>星河影动之全文检索...
|如何|何实|实现|现全|全文|文检|检索|索?|?| -
为什么有的留言簿不需要数据库?
【编程10000问】< html>< body>< form action="manage.asp" method="post">< input type="text" size="10" name="username">< input type="text" size="10" name="homepage">< input type="text" size="10" name="Email">< /form>< /body>< /html>&nbs...
|为什|什么|么有|有的|的留|留言|言簿|簿不|不需|需要|要数|数据|据库|库?|?| -
如何做一个计数器并让人家申请使用?
【编程10000问】第一步,创建一个计数器(最简单的数字计数器,不是图片式的): <% @language="vbscript" %> <% set fsFilesys=CreateObject("Scripting.FileSystemObject") set myText=fsFilesys.OpenTextFile(Server.MapPath("/count")&"\count.txt")count=myText.ReadLine' 读存...
|如何|何做|做一|一个|个计|计数|数器|器并|并让|让人|人家|家申|申请|请使|使用|用?|?| -
如何制作一个防止多次刷新计数的图片计数器?
【编程10000问】请问如何做一个专业的图片计数器? <%countlong=8 ' 定义计数器位数. On Error Resume Next ' 忽略所有的错误. count=server.mappath(count.txt) set cou = server.createobject(scripting.filesystemobject) set out=cou.opentextfile(count,1,fa...
|如何|何制|制作|作一|一个|个防|防止|止多|多次|次刷|刷新|新计|计数|数的|的图|图片|片计|计数|数器|器?|?| -
如何随机显示图片计数器?
【编程10000问】count.asp< html >< head >< meta http-equiv="Content-Type"content="text/html; charset=gb2312" ><title>随风起舞之千变计数器</title></head><body><p><%dim outcountfile=server.mappath("aspcount.txt")set objfile=server.createobject("scripting.filesystemobject")' 定义一个服务器组件.se...
|如何|何随|随机|机显|显示|示图|图片|片计|计数|数器|器?|?| -
如何实现点击数的计算?
【编程10000问】counter.htm<a href=counter.asp?save=123&url=http://127.0.0.1/>http://127.0.0.1</a> 共点击次数:<script src=view.asp?save=123></script> counter.asp<% path="d:data" file=request("save") url=request("url") Set fs = CreateObject("Scripting.FileSystemObject") if fs.FileExists(path...
|如何|何实|实现|现点|点击|击数|数的|的计|计算|算?|?| -
如何让计数器只对新进用户计数?
【编程10000问】如何让计数器只对新进用户计数?<script language=vbscript runat=server>sub application_onstartfilepath=server.mappath("/count")filename=filepath+"\counter.txt"set fs=createobject("scripting.filesystemobject")if not fs.fileexists(filename) then fs.createtextfile(filename) &...
|如何|何让|让计|计数|数器|器只|只对|对新|新进|进用|用户|户计|计数|数?|?|