Advertisement
cornedor

Untitled

Feb 8th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.     class Bootstrap
  3.     {
  4.         public function __construct()
  5.         {
  6.             $path = str_replace("bootstrap.php", "", realpath(__FILE__)) . 'modules/';
  7.             $arr = array();
  8.             if($handle = opendir($path))
  9.                 while(false !== ($entry = readdir($handle)))
  10.                     if(substr($entry, -4) === '.php')
  11.                         $arr[] = $path . $entry;
  12.             sort($arr);
  13.             foreach($arr as $i) require_once($i);
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement