24 hrs old $interval = 86400; // Modified by Ivan Tcholakov, 28-JAN-2010. //if ($handle = opendir('../tmp')) { // while (false !== ($file = readdir($handle))) { // if (((filemtime('../tmp/'.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) { // unlink('../tmp/'.$file); // } // } // closedir($handle); //} if ($handle = opendir(_MPDF_TEMP_PATH)) { while (false !== ($file = readdir($handle))) { if (((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) { unlink(_MPDF_TEMP_PATH.$file); } } closedir($handle); } // exit; } ?>