In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the larave to use env reason analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
Laravel uses env for reasons: 1, to separate files from code to avoid sensitive information submitted to the open source community such as Github; 2, to form a unified specification, new contacts to the project as long as they have read the framework manual or access to the ".env" file can be clear which environment variables need to be configured.
The operating environment of this tutorial: windows7 system, Laravel6 version, Dell G3 computer.
Laravel uses the DotEnv library, and there are reasons for using .env on README, probably as follows:
Files are separated from code to prevent sensitive information from being submitted to open source communities such as Github. Version controllers are generally configured to ignore this file.
To form a unified specification, configuration files in different environments can have a similar effect, but it may result in no uniform naming of LocalConfig.php in Project An and TestConfig.php in Project B. if the .env file is used, people new to the project can know which environment variables need to be configured as long as they have read the framework manual or contacted the .env file.
Note: loading .env files has a certain performance overhead, and for projects with high performance requirements, it is best to merge .env files into your code through tools when publishing to an online production environment.
Thank you for reading this article carefully. I hope the article "Analysis of the reasons why larave should use env" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.