- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018
01:13 AM
11-05-2018
01:13 AM
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.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018
01:49 AM
11-05-2018
01:49 AM
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;
?>
Manish Mittal
https://www.manishmittal.com/
https://www.manishmittal.com/
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018
01:49 AM
11-05-2018
01:49 AM
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;
?>
Manish Mittal
https://www.manishmittal.com/
https://www.manishmittal.com/