<?php
if(file_exists(__DIR__ . "/../config/default.json")){

$xmlStr = json_decode(file_get_contents( __DIR__ .  "/../config/default.json") , true);
$db = mysqli_connect(
                        $xmlStr['Customer']['dbConfig']['DATABASE_HOST'] , 
                        $xmlStr['Customer']['dbConfig']['DATABASE_USER'] ,
                        $xmlStr['Customer']['dbConfig']['DATABASE_PWD'] ,
                        $xmlStr['Customer']['dbConfig']['DATABASE_NAME'] ,
                        $xmlStr['Customer']['dbConfig']['DATABASE_PORT'] 
);

echo "Connession DB - OK";

} else {

  echo "Config db not found.. exiting.";
  exit;

}

?>
