File: src/index.php

Recommend this page to a friend!
  Classes of Marco Cesarato  >  PHP Malware Scanner Free Tool  >  src/index.php  >  Download  
File: src/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Malware Scanner Free Tool
Scan PHP files to find malicious code
Author: By
Last change: fix: autoload for sub namespace classes
feat: add autoload
Date: 1 month ago
Size: 600 bytes



Class file image Download

namespace marcocesarato\amwscan;

// Autoload
spl_autoload_register(function ($name) {
$file = str_replace(__NAMESPACE__ . '\\', '', $name) . '.php';
$file = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $file);

if (!
Scanner::isCli()) {
trigger_error('This file should run from a console session.', E_USER_WARNING);

// Settings
ini_set('memory_limit', '1G');
ini_set('xdebug.max_nesting_level', 500);

// Errors
ini_set('display_errors', 0);

$app = new Scanner();

For more information send a message to info at phpclasses dot org.