×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: somov anatolij
Added: Mar 9, 2021 1:15 AM
Views: 4776
Tags: no tags
  1. <?php
  2. spl_autoload_register ( function ( $class ) {
  3.     $value = str_replace ( '\\' , '/' , $class ) ;
  4.     $value = dirname ( dirname ( __DIR__ ) ) . '/' . mb_strtolower ( $value ,
  5.                     'UTF-8' ) . '.php' ;
  6.     if(is_file ( $value )){
  7.         var_dump ( $value . ' [--include]' ) ;
  8.         require_once(string) $value ;
  9.     } else {
  10.         var_dump ( $value . ' [--no_include]' ) ;
  11.     }
  12. } , true ) ;
  13.