源代码:
<html> <body> <FONT COLOR=#ff0000><% Set fs = Server.CreateObject("Scripting.FileSystemObject") Set rs = fs.GetFile(Server.MapPath("demo_lastmodified.asp")) modified = rs.DateLastModified %></FONT> This file was last modified on: <FONT COLOR=#ff0000><%response.write(modified) Set rs = Nothing Set fs = Nothing %></FONT> </body> </html>
运行结果:
<html> <body> <FONT COLOR=#ff0000><% Set fs = Server.CreateObject("Scripting.FileSystemObject") Set rs = fs.GetFile(Server.MapPath("demo_lastmodified.asp")) modified = rs.DateLastModified %></FONT> This file was last modified on: <FONT COLOR=#ff0000><%response.write(modified) Set rs = Nothing Set fs = Nothing %></FONT> </body> </html>