
April 7th, 2003, 05:39 PM
|
|
Overly white
|
|
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
http://www.asp101.com/samples/viewa...=modified%2Easp
The only problem with this is that you will need to put this code on every page. If you placed it all in an include file and then had it look up the size of Server.Variable("SCRIPT_NAME") that would return the date of the include file I would think.
Maybe a better way would be to place it all in a function with a parameter for the page name, then place the function in an include file. Here is my version of the code, I didn't test it sorry. Hopefully it works or if not you can re post and I'll correct my mistakes
Code:
Function LastModDate(Page)
Dim objFSO
Dim objFile
Dim dateModified
' Creates the object and assigns it to our variable.
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
' Get access to the file
Set objFile = objFSO.GetFile(Server.MapPath(page))
' Get last modified property
LastModDate = objFile.DateLastModified
' Kill our objects
Set objFile = Nothing
Set objFSO = Nothing
End Function
|