本文整理汇总了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);
}
}
}