Welcome Guest, Not a member yet? Register   Sign In
Reload .env file in runtime
#4

(08-25-2024, 12:07 AM)dhiya as Wrote: DotEnv successfuly load the new .env, but the configuration DB still use default value,not use value from the new .env

Yes. The Config object is set the properties when it is instantiated.
If you instantiate the Config object before reloading dot env file, the Config object still has the values before creating dot env file.
Reply


Messages In This Thread
Reload .env file in runtime - by dhiya as - 08-24-2024, 12:19 AM
RE: Reload .env file in runtime - by kenjis - 08-24-2024, 07:45 PM
RE: Reload .env file in runtime - by dhiya as - 08-25-2024, 12:07 AM
RE: Reload .env file in runtime - by kenjis - 08-25-2024, 02:17 AM
RE: Reload .env file in runtime - by kenjis - 08-25-2024, 02:21 AM
RE: Reload .env file in runtime - by dhiya as - 08-25-2024, 03:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB