<?php
/**
* A simple Module loader.
* --------------------
* Devel: Nick Daniels
* Twttr: @ManicSec
*/
require_once 'Module.class.php';
###
## Start an instance of ModuleLoader
$module = ModuleLoader::startInst();
###
## Load a module by name `example`
$example = $module->loadModule("example");
###
## Check if Module loaded `example`
if(is_object($example) &&
$example->module_loaded())
echo "\r\nModule loaded!\r\n";
print_r($module->listModules());
###
## Unload Module, check if unloaded
if($module->unloadModule("example"))
echo "\r\nModule unloaded!\r\n";
print_r($module->listModules());
|