国内流行的内容管理系统(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.

38 lines
837B

  1. <?php
  2. if(!defined('DEDEINC')) exit("Request Error!");
  3. function __autoload($classname)
  4. {
  5. global $cfg_soft_lang;
  6. $classname = preg_replace("/[^0-9a-z_]/i", '', $classname);
  7. if( class_exists ( $classname ) )
  8. {
  9. return TRUE;
  10. }
  11. $classfile = $classname.'.php';
  12. $libclassfile = $classname.'.class.php';
  13. if ( is_file ( DEDEINC.'/'.$libclassfile ) )
  14. {
  15. require DEDEINC.'/'.$libclassfile;
  16. }
  17. else if( is_file ( DEDEMODEL.'/'.$classfile ) )
  18. {
  19. require DEDEMODEL.'/'.$classfile;
  20. }
  21. else
  22. {
  23. if (DEBUG_LEVEL === TRUE)
  24. {
  25. echo '<pre>';
  26. echo $classname.'类找不到';
  27. echo '</pre>';
  28. exit ();
  29. }
  30. else
  31. {
  32. header ( "location:/404.html" );
  33. die ();
  34. }
  35. }
  36. }
  37. ?>