本文整理汇总了PHP中ClineSignature函数的典型用法代码示例。如果您正苦于以下问题:PHP ClineSignature函数的具体用法?PHP ClineSignature怎么用?PHP ClineSignature使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ClineSignature函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ClineError
function ClineError($msg)
{
ob_end_clean();
print ClineSignature();
print "\nError: {$msg}\n";
exit;
}
示例2: dirname
if (!empty($_GET['secret'])) {
if (isset($_GET['ack']) && $_GET['ack'] == 1) {
@ob_end_clean();
print 'ACK';
exit;
}
include dirname(__FILE__) . '/actions/processqueue.php';
return;
}
if (!MANUALLY_PROCESS_QUEUE) {
print "This page can only be called from the commandline";
return;
}
} else {
@ob_end_clean();
print ClineSignature();
ob_start();
include dirname(__FILE__) . '/actions/processqueue.php';
return;
}
# once and for all get rid of those questions why they do not receive any emails :-)
if (TEST) {
print Info('<strong>' . $GLOBALS['I18N']->get('Running in testmode, no emails will be sent. Check your config file.'), 1) . '</strong>';
}
print '<noscript>
<div class="error">' . s('This page requires Javascript to be enabled.') . '</div>
</noscript>';
if (isset($_GET['pqchoice'])) {
if ($_GET['pqchoice'] == 'local') {
SaveConfig('pqchoice', 'local', 0);
} elseif ($_GET['pqchoice'] == 'reset') {
示例3: dirname
require_once dirname(__FILE__) . '/accesscheck.php';
/*
*
* page to handle any cron-related activity. Instead of having multiple cron entries, this
* one page should be called to do the tasks. It should be called as often as possible, eg once every 5 minutes
* or even once a minute.
*
* For now, the configuration is manually, there is no UI for it yet. Plugins can register their own cron activities.
* TODO, work with eg https://github.com/mtdowling/cron-expression
*
*/
if (!$GLOBALS['commandline']) {
print 'This page can only be called from the commandline';
return;
}
cl_output(ClineSignature());
$cronJobs = array();
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
$pluginJobs = $plugin->cronJobs();
# cl_output($pluginname.' has '.sizeof($pluginJobs).' jobs');
foreach ($pluginJobs as $job) {
$cronJobs[] = array('plugin' => $pluginname, 'page' => $job['page'], 'frequency' => $job['frequency']);
}
}
if (!count($cronJobs)) {
cl_output(s('Nothing to do'));
exit;
}
$maxNextRun = 0;
$now = time();
foreach ($cronJobs as $cronJob) {