当前位置: 首页>>代码示例>>PHP>>正文


PHP SJB_HelperFunctions::runScriptByCurl方法代码示例

本文整理汇总了PHP中SJB_HelperFunctions::runScriptByCurl方法的典型用法代码示例。如果您正苦于以下问题:PHP SJB_HelperFunctions::runScriptByCurl方法的具体用法?PHP SJB_HelperFunctions::runScriptByCurl怎么用?PHP SJB_HelperFunctions::runScriptByCurl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SJB_HelperFunctions的用法示例。


在下文中一共展示了SJB_HelperFunctions::runScriptByCurl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

SJB_Event::handle('listingDeactivated', array('SJB_Notifications', 'notifyOnUserListingDeactivated'));
SJB_Event::handle('beforeListingDelete', array('SJB_Notifications', 'notifyOnUserListingDeleted'));
//bind send notification emails if user deactivated/deleted
SJB_Event::handle('onBeforeUserDelete', array('SJB_Notifications', 'notifyOnUserDeleted'));
SJB_Event::handle('onBeforeUserDeactivate', array('SJB_Notifications', 'notifyOnUserDeactivated'));
// bind session clear to task scheduler event
SJB_Event::handle('task_scheduler_run', array('SJB_Session', 'clearTemporaryData'));
SJB_Request::getInstance()->execute();
SJB_Statistics::addStatistics('siteView', '', 0, true);
$isPseudoCronEnabled = intval(SJB_Settings::getSettingByName('isPseudoCronEnabled')) === 1;
if ($isPseudoCronEnabled) {
    $isEmailSchedulerEnabled = intval(SJB_Settings::getSettingByName('email_scheduling')) === 1;
    $isOncePerHourCondition = SJB_Settings::getSettingByName('emailSchedule_lastTimeExecuted') < strtotime('1 hour ago');
    if ($isEmailSchedulerEnabled && $isOncePerHourCondition) {
        SJB_Settings::updateSetting('emailSchedule_lastTimeExecuted', time());
        SJB_System::getModuleManager()->executeFunction('miscellaneous', 'email_scheduling');
    }
    $numberOfPageViewsSinceLastTime = SJB_Settings::getValue('pseudoCron_numberOfPageViewsSinceLastTime');
    $isPageViewCondition = intval(SJB_Settings::getValue('pseudoCron_numberOfPageViewsSinceLastTime')) > SJB_Settings::getSettingByName('numberOfPageViewsToExecCronIfExceeded');
    if ($isPageViewCondition) {
        SJB_Settings::updateSetting('pseudoCron_numberOfPageViewsSinceLastTime', 0);
        list($month, $day, $year) = explode('.', SJB_Settings::getSettingByName('task_scheduler_last_executed_date'));
        $isOnceADayCondition = strtotime("{$year}-{$month}-{$day}") < strtotime('today');
        if ($isOnceADayCondition) {
            SJB_HelperFunctions::runScriptByCurl(SJB_System::getSystemSettings('SITE_URL') . '/system/miscellaneous/task_scheduler/');
        }
    } else {
        SJB_Settings::updateSetting('pseudoCron_numberOfPageViewsSinceLastTime', $numberOfPageViewsSinceLastTime + 1);
    }
}
SJB_HelperFunctions::debugInfoPrint();
开发者ID:Maxlander,项目名称:shixi,代码行数:31,代码来源:index.php


注:本文中的SJB_HelperFunctions::runScriptByCurl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。