fork download
  1. <?php
  2. define('APPLICATION_PATH', realpath(''));
  3. $paths = array(
  4. APPLICATION_PATH,
  5. APPLICATION_PATH . '/com',
  6. );
  7. set_include_path(implode(PATH_SEPARATOR, $paths));
  8.  
  9. function __autoload($className)
  10. {
  11. require_once $className . '.php';
  12. return;
  13. }
  14.  
  15. //require_once('User.php');
  16.  
  17. $user = new User();
  18. echo $user->getName();
  19.  
Runtime error #stdin #stdout 0.02s 13664KB
stdin
Standard input is empty
stdout
Warning: require_once(User.php): failed to open stream: No such file or directory in /home/2QvLeR/prog.php on line 12

Fatal error: require_once(): Failed opening required 'User.php' (include_path='/home/2QvLeR:/home/2QvLeR/com:.:/usr/share/php5:/usr/share/php') in /home/2QvLeR/prog.php on line 12