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 Steel on 01/20/06 20:00

"Pedro Graca"
wrote in answer:
>
> This script shouldn't even run!
> Yes, it has errors.
>
> --


<?php
clearstatcache();
$FileName = 'sem.txt';
$origtime = getdate(filemtime($FileName));

//these following date are they of some type?
$Today=strtotime("now");
$Modifile=filemtime($FileName);

if ($Today>$Modifile)
{
$newtime = mktime(2, 0, 0, $origtime['mon'],
1+$origtime['mday'],$origtime['year']);
touch($FileName, $newtime);

if ($handle = opendir('./cgi-bin/sessions')) {

while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..")
{unlink("./cgi-bin/sessions/" . $file);}
}
closedir($handle);
}
}
?>

Now work?

Thank in advance and best Regards

Steel

 

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

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