Evaluate Config enviroment from External file

Hi,I need to evaluate if my environment is Development or Production from external file (non project file, in php).I wrote this:

require_once('../src/config.php');

$environment = $CONFIG("ENVIRONMENT");

echo $environment;

But no get the value, can you indicates me the way to access from external file?Thanks,Omar

It won’t work if you only wrote that code.You may refer to https://discourse.hkvstore.com/t/how-to-load-data-from-database-into-custom-files-v2024/8911/1

Thanks,I will check this topic.

onoboa wrote:

$environment = $CONFIG(“ENVIRONMENT”);

You have wrong syntax. Note that $CONFIG is an array.