First Baptist Church Library
|
|
|
|
 
| Quotable |
|
<%
Dim objFSO, objTS
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
text_file = server.mappath("quotes_new.htm")
Set objTS = objFSO.OpenTextFile(text_file)
'Now, read the contents of the file into a string
Dim s
s = objTS.ReadAll
'Now, use split to load the contents of the file into an array
Dim aFile
aFiles = split(s, vbCrLf)
Randomize Timer
'How many random elements from the array do we want?
Const n = 10
'For i = 1 to n
value = aFiles(Int(Rnd * UBound(aFiles)))
response.write value
'Now do something with value
'Next
Set objFSO = Nothing
%>
|
|
| The Good News |
| "Make every effort to keep
the unity of the Spirit through
the bond of peace." (Ephesians 4:3) |
|
 
|