SnippetMaster Support Forums
Return to main website
 
December 24, 2007, 12:26:24 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 24, 2007, 12:26:24 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Lastsaved « previous next »
Pages: [1] Print
Author Topic: Lastsaved  (Read 241 times)
poj

Posts: 4


[-] Lastsaved
« on: September 16, 2007, 08:59:54 AM »

I want the visitors to se when a page is updated (lastsaved 2007-09-05) , how do you do that so it works with snippetmaster?

/Poj
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: Lastsaved
« Reply #1 on: September 16, 2007, 09:03:15 AM »

You can do this using either PHP or SSI (server side includes).  However, this has nothing to do with Snippetmaster.

You can use PHP or SSI to get the file updated timestamp and then use that to display to your visitors.  Smile

Report to moderator   Logged
poj

Posts: 4


[-] Re: Lastsaved
« Reply #2 on: September 16, 2007, 09:12:37 AM »

Thanks but i don't know how to do this. Can you help me with some code? php would be fine, please.
/ Poj
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: Lastsaved
« Reply #3 on: September 16, 2007, 10:25:26 AM »

Sure, no problem.  You can put this onto your page:

Code:
Last Modified: <?php echo date("j F Y H:i"filemtime($_SERVER["PATH_TRANSLATED"])); ?>

If that doesn't work, then try this:

Code:
Last Modified: <?php echo date("j F Y H:i"filemtime($_SERVER["SCRIPT_FILENAME"])); ?>


And if that doesn't work.. then try this one:

Code:
Last Modified: <?php echo date("j F Y H:i"filemtime($_SERVER["DOCUMENT_ROOT"].$_SERVER["PHP_SELF"])); ?>


** Don't forget that your page MUST have a .php file extension to "signal" to the server that it contains PHP code.

Cheers!

Smile
« Last Edit: September 16, 2007, 10:55:14 AM by admin » Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Lastsaved « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!