Connect to magento database

As the first of creating the install script we need to establish magento database connection. For include the app/Mage.php file in the script as shown below.

Please refer my tutorial which explains how to import magento products and add attribute options programmatically.

require_once '../app/Mage.php';

Share this Tutorial