Hello all,
I am unable to delete a line for a file, even with permissions set to 777. Heres the code:
$sidslist = file("sids.txt");
$curday=date("d");
$curhour=date("h");
for ($index=0; $index < count($sidslist); $index++) {
list($month,$day,$hour,$min,$sec)=split(":",$sidslist[$index]);
if ($day<$curday) {
unlink($sidslist[$index]);
} elseif ($day=$curday && ($curhour-$hour) >= 12) {
unlink($sidslist[$index]);
} else {
next;
}
}
The unlink is called in the appropriate lines within the file...but the deleting of the line doesn't occur.
Any suggestion on how to delete a line??
Thanks,
gary