<?php
function getmicrotime() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
$root = $_SERVER['DOCUMENT_ROOT'];
$path1 = $root.'/myXML;';
$path2 = $root.'/PEAR;';
$searchPath = $path1.$path2;
ini_set('include_path', $searchPath);
require_once('myEngine.php');
$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_TRIGGER;
$GLOBALS['_PEAR_default_error_options'] = E_USER_WARNING;
$GLOBALS['_myEngine_xslt_translation'] = true;
//Enable for create file debug.xml with xml before translating.
$GLOBALS['_myEngine_debug_xml'] = true;
$page = 'sample.xml';
define('SAMPLE_TEXT', 'This text added in xsl stylesheet through processing instruction');
$result = myEngine::init();
PEAR::isError($result) and
trigger_error($result->getMessage(), E_USER_ERROR);
$result = myEngine::open($page);
PEAR::isError($result) and
trigger_error($result->getMessage(), E_USER_ERROR);
$time_end = getmicrotime();
$time = $time_end - $time_start;
print("<br>Time: $time s.");
?>
|