Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $searchPaths = Array();
- array_push($searchPaths, "");
- array_push($searchPaths, "managers/");
- array_push($searchPaths, "models/");
- require_once 'database.php';
- function __autoload($aClassName){
- global $searchPaths;
- foreach($searchPaths as $paths) {
- $fileName = $paths . $aClassName . ".php";
- if(file_exists($fileName)) {
- require_once $fileName;
- return;
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement