|
Posted by NC on 12/28/07 21:38
On Dec 28, 10:00 am, "R.A.M." <r_ahims...@poczta.onet.pl> wrote:
>
> I am making my first website in PHP5 and I have a problem with
> date/time functions.
> I have written (in Scripts.inc PHP file):
> function Footer()
> {
> echo date('Y.m.d', filemtime($_SERVER['PHP_SELF'])); // this is line
> 201}
>
> to print in footer last modification date of current page.
> Unfortunately I receive errors:
>
> Warning: filemtime() [function.filemtime]: stat failed for
> /StowarzyszenieIntegracja/Club.php in
> F:\Inetpub\wwwroot\StowarzyszenieIntegracja\Scripts.inc on line 201
>
> Strict Standards: date() [function.date]: It is not safe to rely on the
> system's timezone settings. Please use the date.timezone setting, the TZ
> environment variable or the date_default_timezone_set() function. In case
> you used any of those methods and you are still getting this warning, you
> most likely misspelled the timezone identifier. We selected 'Europe/Paris'
> for '1.0/no DST' instead in
> F:\Inetpub\wwwroot\StowarzyszenieIntegracja\Scripts.inc on line 201
>
> I don't understand this errors. Could you help me?
Try this:
date_default_timezone_set('Europe/Warsaw');
echo date('Y.m.d', filemtime($_SERVER['SCRIPT_FILENAME']));
Cheers,
NC
Navigation:
[Reply to this message]
|