Advertisement
skisr2000

functions.php

Feb 1st, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. //if(!function_exists('classAutoLoader')){
  4.  
  5. function classAutoLoader($class){
  6.  
  7.     $class=strtolower($class);
  8.     $the_path = INCLUDES_PATH . DS . "{$class}.php";
  9.  
  10.     if(file_exists($the_path) && !class_exists($class)){
  11.  
  12.     require_once($the_path);
  13.  
  14.     }else{
  15.  
  16.     die("This file name {$class}.php was not found");
  17.     }
  18. }
  19.  
  20. spl_autoload_register('classAutoLoader');
  21.  
  22.  
  23.  
  24.  
  25.  
  26. function redirect($location){
  27.  
  28. header ("Location: {$location}");
  29.  
  30. }
  31.  
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement