本文整理汇总了PHP中nzedb\utility\Misc::clearScreen方法的典型用法代码示例。如果您正苦于以下问题:PHP Misc::clearScreen方法的具体用法?PHP Misc::clearScreen怎么用?PHP Misc::clearScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nzedb\utility\Misc
的用法示例。
在下文中一共展示了Misc::clearScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
<?php
require_once realpath(dirname(dirname(dirname(dirname(__DIR__)))) . DIRECTORY_SEPARATOR . 'indexer.php');
use nzedb\Tmux;
use nzedb\db\Settings;
use nzedb\utility\Misc;
$pdo = new Settings();
$DIR = nZEDb_MISC;
// Check that Db patch level is current. Also checks nZEDb.xml is valid.
Misc::isPatched();
Misc::clearScreen();
$patch = $pdo->getSetting('sqlpatch');
$patch = $patch != '' ? $patch : 0;
$delaytimet = $pdo->getSetting('delaytime');
$delaytimet = $delaytimet ? (int) $delaytimet : 2;
$nntpproxy = $pdo->getSetting('nntpproxy');
echo "Starting Tmux...\n";
// Create a placeholder session so tmux commands do not throw server not found errors.
exec('tmux new-session -ds placeholder 2>/dev/null');
// Search for NNTPProxy session that might be running from a user threaded.php run. Setup a clean environment to run in.
exec("tmux list-session | grep NNTPProxy", $nntpkill);
if (count($nntpkill) !== 0) {
exec("tmux kill-session -t NNTPProxy");
echo $pdo->log->notice("Found NNTPProxy tmux session and killing it.");
} else {
exec("tmux list-session", $session);
}
$t = new Tmux();
$tmux = $t->get();
$tmux_session = isset($tmux->tmux_session) ? $tmux->tmux_session : 0;
$seq = isset($tmux->sequential) ? $tmux->sequential : 0;