473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Last Updated script

I'm working on updating a page for a club that I'm involved in at school. It's on an apache server and I am editing the .htm file through linux.

Does anyone know a script that I could include in the html file that would display the Time and Date that the .htm file was last updated?

Thanks!

I tried the following two things that I found online but neither seemed to work.


(JavaScript)

<SCRIPT LANGUAGE="JavaScript">
<!-- hide script begin var m = "Page updated" + document.lastModified; var p = .length-8;
document.writeln("<center>");
document.write(m.substring(p, 0));
document.writeln("</center>");
// End --> </SCRIPT>


(PHP)

<?
$last_modified = filemtime("example7.php3");
print("Last Modified ");
print(date("m/j/y h:i", $last_modified));
?>
Nov 7 '06 #1
3 3419
figured it out.... here it is if anyone else is wondering


<script language="JavaScript">
<!--//
document.write("<i>"+"Last Updated -"
+document.lastModified + "</i>");
//-->
</script>
Nov 7 '06 #2
baddco
1
I'm interested in a twist on this. I like the updated script, But can I make the results of one pages update appear on another? Example: I'm working on a site for a photographer, instead of updates appearing only on the page that was updated, could they also appear on the main page of the site?
Jul 21 '07 #3
drhowarddrfine
7,435 Expert 4TB
Yes but you need to ask on the javascript forum.
Jul 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: JPM III | last post by:
I wrote a PHP script that allows me to post HTML entries to files on my server without going through FTP, yadda yadda. It works fine, and last night it updated both files properly. Today, it...
10
by: robinpg.SHU | last post by:
As title really, does anyone know of (or could write?) a php file which in a directory of .jpg files display the most recent added to that /dir? Can anyone help?
3
by: Toby Briggs | last post by:
Hi there, New to here! I'm trying to find a script which let's people know when a page has been last updated! I've got a script, but it gives the date as mm/dd/yyyy! I would prefer...
2
by: Roy Veevers | last post by:
Hi, Need to run a script "last updated on" on a personal Website. Problem is the ones I can find rely on my servers synchronised time! This is one hour behind the correct time (Summertime) at my...
2
by: Warmbells | last post by:
Hello, Most of the pages on the site I manage are html with a few with php snippits on them which are named .php, on the html pages I have a 'Last Updated' piece of code as follows Last...
1
by: eal1 | last post by:
Does anyone know how to have Access put the "last updated" date on a report? I have a table of our university's athletic events, grouped by each sport per page. I'm trying to get the report to...
1
by: mpaine | last post by:
I have read http://msdn2.microsoft.com/en-us/library/ms178472(VS.80).aspx and my interpretation is that custom events should be fired between Page_Load and Page_LoadComplete. When I run the...
0
by: jaimebienlesfruits | last post by:
Is there a script I can include on the bottom of each page to indicate when the page was last updated? The PHP timstamp thing doesn't seem to work as it reflects the date of visit on the user's part....
2
by: chainfire316 | last post by:
Hi, I am trying to find a script that automatically updates and lets my viewers know when a page was last updated but I want it to display on a different page then the one that is updating. Can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.