Skip to content

Instantly share code, notes, and snippets.

@baileylo
Created October 29, 2010 07:15
Show Gist options
  • Save baileylo/653074 to your computer and use it in GitHub Desktop.
Save baileylo/653074 to your computer and use it in GitHub Desktop.
<?php
$model_object = parse_ini_file('object_map.ini');
function __autoload($class_name) {
global $model_object;
$class_name = strtolower($class_name);
if (!isset($model_object[$class_name])) {
exit('invalid class name');
}
require_once($model_object[$class_name]);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment