/helpers/autoload.php

https://github.com/MilkZoft/zan · PHP · 14 lines · 14 code · 0 blank · 0 comment · 1 complexity · 9784010b5d1891eed375a0f8ff10a470 MD5 · raw file

  1. <?php
  2. if (!defined("ACCESS")) {
  3. die("Error: You don't have permission to access here...");
  4. }
  5. if (!function_exists("__autoload")) {
  6. function __autoload($class) {
  7. $class = strtolower(str_replace("ZP_", "", $class));
  8. if (file_exists(CORE_PATH ."/classes/". strtolower($class) .".php")) {
  9. include CORE_PATH ."/classes/". strtolower($class) .".php";
  10. }
  11. }
  12. }