• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use composer when application and system directory are not in webroot?

#2
Assuming you want vendor/ at the same level as application/ then, using the example code below, adjusting for some other file structure is automatic as long as vendor/ and application/ retain the same relationship in the file hierarchy

PHP Code:
$config['composer_autoload'] = str_replace('application/''vendor/'APPATH); 

If you're going with vendor/ inside application/ then do this.

PHP Code:
$config['composer_autoload'] = APPATH 'vendor/'

There is no advantage or disadvantage I can think of for having them one place or the other, but I agree it is best to have both outside the public space.
Reply


Messages In This Thread
RE: how to use composer when application and system directory are not in webroot? - by dave friend - 11-08-2019, 02:03 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.