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;     } } ); 
  1. make $config['composer_autoload'] = false;

  2. then add ( require fcpath . 'application/vendor/autoload.php'; ) below spl_autoload_resgister function.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -