Source for file loaddnaprovider.php
Documentation is available at loaddnaprovider.php
* DOM script for loading database connection, this script is included in every script via head.php
* @author Gabriele Droege, DNA Bank Network <contact@dnabank-network.org>
* @copyright Copyright © 2011 DNA Bank Network http://www.dnabank-network.org<br>The contents of this file are subject to the Mozilla Public License Version 1.1
* @license http://www.mozilla.org/MPL/ MPL
$dom =
new DOMDocument('1.0', 'UTF-8');
if(!file_exists("load/provider.xml")) { $dom->load("../load/provider.xml");}
else { $dom->load("load/provider.xml"); }
$Providers =
$dom->getElementsByTagName('provider');
foreach ($Providers as $Provider) {
$DBMStest =
$Provider->getElementsByTagName('dbms');
$DBMS =
$DBMStest->item(0)->nodeValue;
$hosttest =
$Provider->getElementsByTagName('host');
$host =
$hosttest->item(0)->nodeValue;
$dbtest =
$Provider->getElementsByTagName('db');
$dbname =
$dbtest->item(0)->nodeValue;
$usertest =
$Provider->getElementsByTagName('user');
$user =
$usertest->item(0)->nodeValue;
$pwtest =
$Provider->getElementsByTagName('pw');
$passwd =
$pwtest->item(0)->nodeValue;
} //foreach ($Providers as $Provider)
Documentation generated on Tue, 29 Nov 2011 10:44:53 +0100 by phpDocumentor 1.4.3