Skip to content

Instantly share code, notes, and snippets.

<?php
// assuming we are in a subfolder to root like 'scripts'
define('TL_ROOT', dirname(__DIR__));
require TL_ROOT . '/system/config/localconfig.php';
// Database credentials
$strHost = $GLOBALS['TL_CONFIG']['dbHost'];
$strUser = $GLOBALS['TL_CONFIG']['dbUser'];
$strPassword = $GLOBALS['TL_CONFIG']['dbPass'];