############################################################################
Function to Get a Value from XML Settings file provided as a second argument
Default is ../main/settings.xml: standard for all of our current projects
Usage: $objClass->fnGetProperty("SiteURL", "settings.xml");
############################################################################
function fnGetProperty($varPropName, $varXMLFile = '../main/settings.xml')
{
$objXML = new clsXML($varXMLFile);
$varValue = $objXML->evaluate("//" . $varPropName);
$varRetValue = $objXML->get_content($varValue[0]);
$objXML = NULL;
return($varRetValue);
}
Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment