本文整理匯總了PHP中FileList::performScanning方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileList::performScanning方法的具體用法?PHP FileList::performScanning怎麽用?PHP FileList::performScanning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FileList
的用法示例。
在下文中一共展示了FileList::performScanning方法的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());
}
}
}