52php
中级会员
 
UID 84572
精华
0
积分 361
帖子 225
金钱 361 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2006-12-10
状态 离线
|
[广告]: q
m
cron 来看看
最近看了vbb的cron觉得奇怪,在cron.php文件中,我看到了执行之前的跳转。按道理说跳转后不应该执行,可是他的却可以,百思不得其解。代码如下:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.5.2 - Licence Number $sm_lickey
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?000-2005 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
ignore_user_abort(1);
@set_time_limit(0);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('SKIP_SESSIONCREATE', 1);
define('NOCOOKIES', 1);
define('THIS_SCRIPT', 'cron');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_cron.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
header('Location: ' . $vbulletin->options['cleargifurl']);
($hook = vBulletinHook::fetch_hook('cron_start')) ? eval($hook) : false;
if (!defined('NOSHUTDOWNFUNC') AND !$vbulletin->options['crontab'])
{
vB_Shutdown::add('exec_cron');
}
else
{
$cronid = NULL;
if ($vbulletin->options['crontab'] AND SAPI_NAME == 'cli')
{
$cronid = intval($_SERVER['argv'][1]);
// if its a negative number or 0 set it to NULL so it just grabs the next task
if ($cronid < 1)
{
$cronid = NULL;
}
}
exec_cron($cronid);
if (defined('NOSHUTDOWNFUNC'))
{
exec_shut_down();
}
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: $sm_time, $sm_date
|| # CVS: $RCSfile: cron.php,v $ - $Revision: 1.38.2.1 $
|| ####################################################################
\*======================================================================*/
?> header('Location: ' . $vbulletin->options['cleargifurl']);
有研究的告诉下,用来输出图片可以理解,可是跳转了还能执行我就很郁闷。
|
|