Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date STamping Only On Modification 1

Status
Not open for further replies.

SandraF

Programmer
Jan 25, 2001
28
US
I would like to date stamp each web page with last modified (date).
The problem is that I do not know how to check if the web page has been modified.
 
Sandra,

If I understand your question correctly the following bit of code should help...

Code:
date.asp -
<%
sFilePath = Request.ServerVariables(&quot;PATH_TRANSLATED&quot;)

Dim oFSO: Set oFSO = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Dim oFile: Set oFile = oFSO.GetFile(sFilePath)

dteUpdated = oFile.DateLastModified
%>
<html>
<body>
Change this line and save it to change modified date.<br>
This page was last updated: <%=dteUpdated%>
</body>
</html>

Later,
Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top