[英]How to assign environment variables in .env file to $_ENV variable php
In laravel, the environment variables are stored in the.env file and later assigned to the $_ENV superglobal variable.在 laravel 中,环境变量存储在 .env 文件中,稍后分配给 $_ENV 超全局变量。 What should I do if I want the same function (get the variables in the.env file).
如果我想要相同的 function 该怎么办(获取 .env 文件中的变量)。 I tried researching but my efforts are in vain...
我试图研究,但我的努力是徒劳的......
You can use this lib for that: https://github.com/vlucas/phpdotenv你可以使用这个库: https://github.com/vlucas/phpdotenv
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.