php - Composer autoload is overriding codeigniter autoload -
i using composer. composer autoload file in application/vendor/autoload.php. in codeigniter 3 set ["composer_autoload"] = true in config. overriding main autoload of codeigniter , couldn't able load main classes of codeigniter , codeigniter libraries. should do?
at end of config file there comment below uncomment it.
spl_autoload_register( function ( $class ) { $file = "sources/" . $class . ".class.php"; if ( file_exists( $file ) ) { require $file; return; } } );
make $config['composer_autoload'] = false;
then add ( require fcpath . 'application/vendor/autoload.php'; ) below spl_autoload_resgister function.
Comments
Post a Comment