This question shows research effort; it is useful and clear
-2
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
次のコードがあります。
$days = 7;
// Check if the file is older than X days old
if (filemtime($path.$file) < ( time() - ( $days * 24 * 60 * 60 ) ) )
{
// Do the deletion
unlink($path.$file);
}
$minutes = 15;
// Check if the file is older than x minutes
if (filemtime($path.$file) < ( time() - ( $minutes * 60 ) ) ) {
// Do the deletion
unlink($path.$file);
}