Welcome Guest, Not a member yet? Register   Sign In
how to use composer when application and system directory are not in webroot?
#2

(This post was last modified: 11-08-2019, 02:08 PM by dave friend.)

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



Theme © iAndrew 2016 - Forum software by © MyBB