Use javascript to get the file uploaded on a web page last modify date?

2006-07-20 9:20 am
I have made a web page for downloading some files.

I wanna show the last modified/updated date for those files shown in my page, which are stored in my server, i.e. users get the files from my server via the web page.

By using javascript, how to get these dates and show it on my web page?
更新1:

I am not wanting the web page last modified date. I am wanting the date that the file I uplaoded on the server. For example: The web page is RE_DOWN.HTML The files display in it called ABC.XLS DEF.TXT and I actually wants the last modified date of ABC.XLS and DEF.TXT. But not the date of RE_DOWN.HTML Thanks

更新2:

Then how can I do by using PHP??

更新3:

How to use those SSI code?? Would you please give me and example?

回答 (3)

2006-07-20 12:09 pm
✔ 最佳答案
The information is also available from Server programming in Perl or SSI commands
<!--#echo var="LAST_MODIFIED"-->
or <!--#flastmod file="main.shtml"-->

See link for more details.
2006-07-20 4:51 pm
The answer that Andoryu.net gave you will only display the last modified date of the html file that the code is embedded in. As far as I know, getting file information from the server (in effect what you want to do) is not something that JavaScript can do. For that I would use PHP.

Rawlyn.
2006-07-20 4:26 pm
Surf to "How to display the last modified date" at:
http://www.chami.com/tips/Internet/041198I.html

If you're in a hurry, simply copy and paste the code the web page.


收錄日期: 2021-04-30 23:04:42
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20060720012032AArl4G9

檢視 Wayback Machine 備份