Every time a counter visitor comes in and sees the same picture, does it appear a bit of mono-apoptotic?
let visitors see a different picture every time they come? With the counter is very simple to achieve!
source program is as follows:
<%
'----------------------------------------------------------counting program started
Dim fileobject,countfile,out,counter,picno,pp
Set fileobject=server.createobject ("Scripting.FileSystemObject")
Countfile=server.mappath ("Count.txt")
Set out=fileobject.opentextfile (countfile,1,false,false)
Counter=out.readline
Out.close
SET fileobject=server.createobject ("Scripting.FileSystemObject")
Set out=fileobject.createtextfile (countfile,true,false)
Application.Lock
counter= counter + 1
'----------------------------------------------------------Counting program end
if counter>99 then counter=0 ' cannot exceed a value, this place
you notice, you can't be the same as the numeric variables displayed: (
If Counter<10 then ' I now only have 10 pictures, 10 below is
' show how much
Picno=counter
Else
picno= (counter mod 10) ' is larger than 10, because I have only 10
Picture: (
End If
out.writeline (counter) ' The current count value exists counter.txt inside
Application.UnLock
Out.close
%>
The method used to
This example is to use a text file for access
Display Picture
<%response.write ("<img src=http://www.163design.net/a/y/" & Images/face/face "&picno&". jpg width=229 height=160> ")%>