Autoload Classes and Functions


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. foreach($autoload as $type => $name) {
  2.  
  3. if($type=='libraries' && $name != NULL) {
  4. require_once(SYS_PATH . 'libraries' . DIRSEP . $name . '.php');
  5. eval("\${$name} = new {$name}({$Pronto});");
  6. $Pronto->set($name);
  7. }
  8.  
  9. if($type=='helpers' && $name != NULL) {
  10. require_once(SYS_PATH . 'helpers' . DIRSEP . $name . '.php');
  11. }
  12.  
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.