Skip to content

Instantly share code, notes, and snippets.

@filhodanuvem
Created January 18, 2012 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filhodanuvem/1630227 to your computer and use it in GitHub Desktop.
Save filhodanuvem/1630227 to your computer and use it in GitHub Desktop.
examples from simpleAnnotation
<?php
$proj = substr(__DIR__,0,strrpos(__DIR__, '/'));
$root = substr($proj,0,strrpos($proj, '/'));
set_include_path($root . PATH_SEPARATOR. $proj . PATH_SEPARATOR. get_include_path());
function loader($class_name)
{
$path = str_replace('\\','/',($class_name)).'.php';
require_once($path);
}
spl_autoload_register('loader');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment