Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. spl_autoload_register( function ( $class_name ) {
  2. $models_path = __DIR__ . '/models/' . $class_name . '.php';
  3. $services_path = __DIR__ . '/services/' . $class_name . '.php';
  4.  
  5. if ( file_exists( $models_path) ) {
  6. require( $models_path );
  7. } else if ( file_exists( $services_path ) ) {
  8. require( $services_path );
  9. }
  10. } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement