Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: PHP 'Page Last Modified' in your timezone Tutorial

Generate a 'Page Last Modified' message for your documents, again, to your timezone.

Tutorial Details:

Pixel-Pro - PHP Tutorials

If you have ever wanted to get that "Page last updated/modified on blah blah" on one of your pages, but also wanted it displayed in your timezone, well you are in luck ;) Just read on!

As always, start with the Now, using the filemtime() function, we will give the variable $modified a value of when the file index.php was last modified.
$modified = filemtime("index.php");

Next, we will define the time offset from the server, so we can display the correct modification time (for more on this, you might want to visit my getting the date and time in your timezone tutorial ).

$offset = 3600*10;
Righto, now using the 2 variables we set, $modified and $offset, we will define the time using gmdate().
$date = gmdate("dS F Y, G:i", $modified + $offset);
Then, we output the date with a little message and finish off the PHP script.
echo "Last Modified On: $date";


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
PHP 'Page Last Modified' in your timezone Tutorial

View Tutorial:
PHP 'Page Last Modified' in your timezone Tutorial

Related Tutorials:

Java Q&A - Java Still Open
Java Q&A - Java Still Open
 
Build servlet-based enterprise Web applications - JavaWorld - December 1998
Build servlet-based enterprise Web applications - JavaWorld - December 1998
 
XSL gives your XML some style - JavaWorld June 2000
XSL gives your XML some style - JavaWorld June 2000
 
Develop Java portlets
Develop Java portlets
 
Introducing the Portlet Specification, Part 2
Introducing the Portlet Specification, Part 2
 
Trustin Lee\'s String/Object Converter - Changes
TL-convert Trustin Lee's String/Object Converter provides a simple API to convert Java objects into strings and vice versa. It is developed to replace Jakarta Commons BeanUtils and Jakarta Commons Convert and to provide only String/Object converters.
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
Servlets and JavaServer Pages (JSP) : A Tutorial
An excellent tutorial on JSP and Servlets.
 
FreeMarker FreeMarker 2.3.1 an open-source HTML template engine.
FreeMarker provides an easy way to get data from Java servlets into Web pages, and helps you keep graphic design separate from application logic. To use it, you encapsulate HTML in templates.
 
JSP Tutorial
This Tutorial is for beginners in the Java Server Pages Technology
 
Device Driver Tutorial for the Solaris OS
Make your hardware work with the Solaris OS on x86 or SPARC architectures. If you are a beginning Solaris kernel programmer, start with this new tutorial on docs.sun.com.
 

Linux Hosting Plans Proxima Web-Hosting Our basic hosting packages include support for a wide variety of web technologies, backed by instant account management with our Personal Control panel. With our guaranteed
 
First Step towards JDBC!
First Step towards JDBC! Welcome to our JDBC Section First Step towards JDBC This article introduce you with JDBC and shows you how to create a database application to access the databases. Accessing the Database from Servlet This article shows
 
JSP FUNDAMENTALS
JSP FUNDAMENTALS JSP FUNDAMENTALS By: Hrishikesh Deshpande Introduction : JSP termed as Java Server Pages is a technology introduced by Sun Microsystems Inc. to develop the web application in more efficient way than Servlets. It has got many
 
Building Search Engine Applications Using Servlets !
Building Search Engine Applications Using Servlets ! Building Search Engine Applications Using Servlets Please visit http://www.webappcabaret.com/javadevelopers/search to see running copy of our search engine. Introduction This tutorial takes
 
Beginner to advance guide to the Apache Struts
Beginner to advance guide to the Apache Struts The Complete Apache Struts Tutorial This complete reference of Jakarta Struts shows you how to develop Struts applications using ant and deploy on the JBoss Application Server. Ant script is provided
 
Struts Guide
Struts Guide Struts Guide This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web
 
Web Hosting Guide. What is Web Hosting Plan?
Web Hosting Guide. What is Web Hosting Plan? What is Web Hosting Plan? Web hosting plan is the different plans provided by Hosting Companies for hosting your web site. Web hosting plans include the storage limit, bandwidth, access to server
 
What is Web Hosting
What is Web Hosting What is Web Hosting? What is Web Hosting? If you have a company and want web presence than you need a website. With the website any one from the world must be able to view your pages, images etc. Website is actually a
 
A Practical Roadmap for Deploying Enterprise Web Applications: Taking the First Step
This article covers important decision points around the availability, scalability, and security that are needed for enterprise web applications.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.