|
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]
|