Re: Date Auto-Update on Save Dreamweaver/PHP
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Date Auto-Update on Save Dreamweaver/PHP

From: Andy Jeffries <news@andyjeffries.co.uk>
Date: Wed Apr 05 2006 - 12:11:54 CEST

On Tue, 04 Apr 2006 20:47:10 -0700, NC wrote:
>> Just wondering if any of you knew of a way to trap the <!-- #BeginDate
>> format:Am1 -->April 4, 2006<!-- #EndDate --> (Dreamweaver's
>> Auto-Update-on-Save Date Code) into a PHP variable and still have the
>> Date update on save?
>
> Why bother? Just use the file system functions:
>
> $saved_date = date('F j, Y', filectime(__FILE__));

But you probably want to use filemtime not filectime. The date of the
last save, not the date the file was created on.

Cheers,

Andy

-- 
Andy Jeffries MBCS CITP ZCE   | gPHPEdit Lead Developer
http://www.gphpedit.org       | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Received on Mon May 1 02:48:37 2006