国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

autoload.inc.php 925B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. if(!defined('DEDEINC')) exit("Request Error!");
  3. /**
  4. * @version $Id: autoload.inc.php 1 17:44 2020-09-22 tianya $
  5. * @package DedeBIZ.Libraries
  6. * @copyright Copyright (c) 2020, DedeBIZ.COM
  7. * @license https://www.dedebiz.com/license
  8. * @link https://www.dedebiz.com
  9. */
  10. function __autoload($classname)
  11. {
  12. $classname = preg_replace("/[^0-9a-z_]/i", '', $classname);
  13. if( class_exists ( $classname ) )
  14. {
  15. return TRUE;
  16. }
  17. $libclassfile = $classname.'.class.php';
  18. if ( is_file ( DEDEINC.'/'.$libclassfile ) )
  19. {
  20. require DEDEINC.'/'.$libclassfile;
  21. }
  22. else
  23. {
  24. if (DEBUG_LEVEL === TRUE)
  25. {
  26. echo '<pre>';
  27. echo $classname.'类找不到';
  28. echo '</pre>';
  29. exit ();
  30. }
  31. else
  32. {
  33. header ( "location:/404.html" );
  34. die ();
  35. }
  36. }
  37. }