Welcome Guest, Not a member yet? Register   Sign In
DotEnv file is better loaded from the index.php
#3

(06-06-2024, 01:54 AM)kenjis Wrote: I don't know your directory structure. Where do you put .env files?

In any case, you can extend or replace Boot.php, and use it in your index.php.
So there is no limitations.
I keep them in a folder called "app_settings/client_name/". so several clients have their env file, but they run exactly the same code base(app, system). My concern over modifying the Boot.php is for updates, I wouldn't want to do any modification in the system directory. Best place to do that is the index.php file, because it's what stays in the public_html/. the index.php file and the .env files are not "really part" of the "framework code", so they can be modified based on the ideal configuration for the project. Besides, I can't have multiple "Boot.php" files, but I can have multiple index.php and env files. 

Thanks, really hope this is considered.
Reply


Messages In This Thread
RE: DotEnv file is better loaded from the index.php - by chenzen - 06-08-2024, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB