Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Bootstrap
- {
- public function __construct()
- {
- $path = str_replace("bootstrap.php", "", realpath(__FILE__)) . 'modules/';
- $arr = array();
- if($handle = opendir($path))
- while(false !== ($entry = readdir($handle)))
- if(substr($entry, -4) === '.php')
- $arr[] = $path . $entry;
- sort($arr);
- foreach($arr as $i) require_once($i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement