php - How to find the base directory where vendor is installed from a composer package -


i'm trying find base directory of application within composer package. there composer api or proper way accomplish this.

to clarify, if package install looks , i've got files here (using psr-4):

/home/project/vendor/acme/my-package/src/ 

how can find /home/project dynamically?

updated info:

i'm trying load .env file root contains api url endpoint via dotenv package within package.

ah.. think i've figured out..

since used include_once './vendor/autoload.php'; in index.php can use getcwd() package


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -