Laravel 4: Why does my class autoload but global variables are not available
问题 I've autoloaded a class, which is properly namespaced and PSR-0. I put it in app/lib/CI, and the class and it's filename are the same "DB". The class file itself includes a config file before the actual class: require( 'config.php' ); class DB { // ... } The class is clearly autoloading, because when I call the static method connect it does display an error message from inside ::connect(). The problem is, global variables that are inside the included config.php are not available inside the