You are here: Re: To cange the last modidied date of a file « PHP Programming Language « IT news, forums, messages
Re: To cange the last modidied date of a file

Posted by Pedro Graca on 01/20/06 17:17

Steel wrote:
> "Pedro Graca"
> kindly wrote:
>> clearstatcache();
>> $origtime = getdate(filemtime($FileName));
>> $newtime = mktime(0, 0, 0, $origtime['mon'], 1+$origtime['mday'],
>> $origtime['year']);
>>
>> touch($FileName, $newtime);
>
> Well,
> Thank you
> At last my full script is:
> <?php
> $FileName = 'sem.txt';
> clearstatcache();
> $origtime = getdate(filemtime($FileName));
> $Today=strtotime("now")
semicolon!

> if $Today>$origtime
parenthesis around the conditional expression;

and,
$Today is UNIX timestamp and $origtime is an array
I'm not sure you can compare them like that and obtain the result you
expect.

> {
<snip contents="unchecked code and script rationale"/>

> I'ld like very much to knoe if there are errors?

This script shouldn't even run!
Yes, it has errors.

--
If you're posting through Google read <http://cfaj.freeshell.org/google>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация