hi guys, i need to fetch DB details from env.php to .phtml file .
is this possible ? can any one guide me.
Solved! Go to Solution.
Hello @bharath553
You can get the dataabase details by this code:
<?php
$envFilePath = __DIR__ . '/app/etc/env.php';
$configResult = include $envFilePath;
echo "<pre>";print_r($configResult);die;
?>
Hello @bharath553
You can get the dataabase details by this code:
<?php
$envFilePath = __DIR__ . '/app/etc/env.php';
$configResult = include $envFilePath;
echo "<pre>";print_r($configResult);die;
?>