by
646 12
0
5
1,093
0
Top 1% !
Popular
Famous
Specified
MultiPlatform
Popularity: 33556th place
No tags for this snippet yet.
LanguagePHP
SourceGitHub
SourceMyGists

Magento - Retrieve DB Info from local.xml

Magento - Retrieve DB Info from local.xml: 
magento-retrieve-db-info.php
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1618960/Magento---Retrieve-DB-Info-from-local-xm?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<?php // Bootstrap Magento require_once("../www/app/Mage.php"); $app = Mage::app('default'); // Grab our database config info $config = Mage::getConfig()->getResourceConnectionConfig("default_setup"); // Connect to our RDS MySQL instance $mysqli = new mysqli($config->host, $config->username, $config->password, $config->dbname); // check RDS MySQL connection if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit(); }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus