本文整理汇总了PHP中FileList::setInterval方法的典型用法代码示例。如果您正苦于以下问题:PHP FileList::setInterval方法的具体用法?PHP FileList::setInterval怎么用?PHP FileList::setInterval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileList
的用法示例。
在下文中一共展示了FileList::setInterval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start
public function start()
{
global $projectTmpDir, $php_errormsg;
$authenticator = new Auth();
if ($authenticator->auth()) {
ob_start();
if (!empty($_GET['a'])) {
$action = $_GET['a'];
$interval = empty($_GET['delay']) ? 5 : (int) $_GET['delay'];
$fileScanner = new FileList();
$fileScanner->setInterval($interval);
if ($action === 'cleanUp') {
$this->removeTempFiles();
print json_encode(array('type' => 'cleanUp', 'status' => 'ok', 'phpError' => $php_errormsg));
} else {
if ($action === 'getFileList') {
echo $fileScanner->performScanning();
} else {
if ($action === 'getSignatureScanResult') {
$this->detector = new MalwareDetector();
$this->detector->setRequestDelay($interval);
print $this->detector->malwareScanRound();
} else {
if ($action === 'getWebsiteLog') {
//REPORTING
$xmlLog = $this->getXMLReport();
$logFilename = $projectTmpDir . '/scan_log.xml';
file_put_contents2($logFilename, $xmlLog);
print json_encode(array('type' => 'getWebsiteLog', 'status' => 'ok', 'phpError' => $php_errormsg));
}
}
}
}
} else {
//GENERATE INTERFACE
$fileScanner = new FileList();
define('PS_ARCHIVE_DOWNLOAD_URL', $_SERVER['PHP_SELF'] . '?controller=download&f=report');
$this->templateOutput($fileScanner->getInterval());
}
}
}