Skip to main content
2 of 2
removed "Drupal" and tags from the title
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How do I access the configuration variables present in settings.php through my code?

I want to access the variables present in the settings.php in my custom module. For example, if the settings.php file contains the $config['test']['uid'] = 'ABC'; line, I want to access the content of $config['test']['uid'] in a controller.

How can I achieve this?