本文整理匯總了PHP中Indexer::freeXmlReader方法的典型用法代碼示例。如果您正苦於以下問題:PHP Indexer::freeXmlReader方法的具體用法?PHP Indexer::freeXmlReader怎麽用?PHP Indexer::freeXmlReader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Indexer
的用法示例。
在下文中一共展示了Indexer::freeXmlReader方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: microtime
$total_deleted_files += $deleted_files;
$total_deleted_dirs += $deleted_dirs;
$total_count++;
$et = microtime(true);
printlog(1, round($et - $st, 2) . "s\n");
sleep(1);
//win+mysql 5.1: id=0 fixing
}
}
$get = microtime(true);
printlog(1, "========\n");
printlog(0, "{$total_count} users-ADDED {$total_added_files} files,{$total_added_dirs} dirs;DELETED:{$total_deleted_files} files,{$total_deleted_dirs} dirs-" . sprintf("%01.2f", $get - $gst) . "s\n");
if ($deleted_users = Indexer::delOldUsers()) {
printlog(0, "{$deleted_users} old(or empty) users deleted from db\n");
}
Indexer::freeXmlReader();
$dir = opendir(WORKER_TMPDIR);
$deleted = 0;
while ($fn = readdir($dir)) {
if (pathinfo($fn, PATHINFO_EXTENSION) == 'bz2') {
@unlink(WORKER_TMPDIR . '/' . $fn);
$deleted++;
}
}
printlog(1, "{$deleted} bz2 files deleted\n");
function printlog($debugLevel, $message)
{
$debug = defined('DEBUG') ? constant('DEBUG') : 0;
if ($debug >= $debugLevel) {
echo $message;
}