本文整理匯總了PHP中notice::index方法的典型用法代碼示例。如果您正苦於以下問題:PHP notice::index方法的具體用法?PHP notice::index怎麽用?PHP notice::index使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類notice
的用法示例。
在下文中一共展示了notice::index方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
function index_action($id = '')
{
@(include PLUS_PATH . 'cron.cache.php');
if (is_array($cron) && !empty($cron)) {
foreach ($cron as $key => $value) {
if ($id) {
if ($value['id'] == $id) {
$timestamp[$value['nexttime']] = $value;
$timestamp[$value['nexttime']]['cronkey'] = $key;
}
} else {
if ($value['nexttime'] <= time()) {
$timestamp[$value['nexttime']] = $value;
$timestamp[$value['nexttime']]['cronkey'] = $key;
}
}
}
if ($timestamp) {
krsort($timestamp);
$croncache = current($timestamp);
ignore_user_abort();
set_time_limit(600);
if (file_exists(LIB_PATH . 'cron/' . $croncache['dir'])) {
include LIB_PATH . 'cron/' . $croncache['dir'];
if ($croncache['dir'] == "notice.php") {
$notice = new notice($this->obj);
$notice->index();
}
}
$nexttime = $this->nextexe($croncache);
$this->obj->DB_update_all("cron", "`nowtime`='" . time() . "',`nexttime`='" . strtotime($nexttime) . "'", "`id`='" . $value['id'] . "'");
$cron[$croncache['cronkey']]['nexttime'] = strtotime($nexttime);
$data['cron'] = ArrayToString($cron);
made_web_array(PLUS_PATH . 'cron.cache.php', $data);
}
}
}