本文整理汇总了PHP中XMLParser::parseCurrencies方法的典型用法代码示例。如果您正苦于以下问题:PHP XMLParser::parseCurrencies方法的具体用法?PHP XMLParser::parseCurrencies怎么用?PHP XMLParser::parseCurrencies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XMLParser
的用法示例。
在下文中一共展示了XMLParser::parseCurrencies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: XMLParser
* Date: 16.12.2015
* Time: 10:35
*/
set_include_path("C:/wamp/www/testserver.int/imsmedia/");
include_once "parser/xml_parser/XMLParser.php";
include_once "loader/file_loader/FileLoader.php";
include_once "IMSMediaHeader.html";
$parser = new XMLParser();
$loader = new FileLoader();
$output = '<a href="/imsmedia/Import.html"><button>Back</button></a><hr>';
try {
$uploadFileName = $loader->load();
$output .= "A file was imported succesfully<br>";
$content = file_get_contents($uploadFileName);
$parser->parse($content);
$currencies = $parser->parseCurrencies();
$measurements = $parser->parseMeasurements();
$categories = $parser->parseCategories();
$products = $parser->parseProducts();
AbstractDAO::closeConnection();
$output .= "<h2>Measurements</h2>";
$output .= nl2br($measurements);
$output .= "<h2>Currencies</h2>";
$output .= nl2br($currencies);
$output .= "<h2>Categories</h2>";
$output .= nl2br($categories);
$output .= "<h2>Products</h2>";
$output .= nl2br($products);
} catch (Exception $e) {
$output .= "Upload is failed<hr>" . $e->getMessage() . " " . $e->getTraceAsString();
}