?> '</p> <h3>URI to abs & file path transform for DocumentRoot based URIs</h3> <?php $test = array(array('src' => ''), array('src' => '/'), array('src' => 'Files/'), array('src' => '/Files'), array('src' => '/Files/'), array('src' => 'Files/../alias'), array('src' => 'Files/../d'), array('src' => 'Files/../u'), array('src' => '/alias'), array('src' => '/d'), array('src' => '/u'), array('src' => 'Files/alias'), array('src' => 'Files/d'), array('src' => 'Files/u'), array('src' => '../Demos/Files/u'), array('src' => '../Assets/../Demos/Files'), array('src' => 'Files/././../../D/.././Demos/Files')); foreach ($test as $tc) { $t = $tc['src']; $emsg = null; $r1 = ''; $r2 = ''; try { $r1 = $browser->rel2abs_url_path($t); $r2 = $browser->url_path2file_path($t); } catch (FileManagerException $e) { $emsg = $e->getMessage(); } echo "\n<pre>ORIG: [" . htmlentities($t, ENT_NOQUOTES, 'UTF-8') . "]\nURI.ABS: [" . htmlentities($r1, ENT_NOQUOTES, 'UTF-8') . "]\nDIR.ABS: [" . htmlentities($r2, ENT_NOQUOTES, 'UTF-8') . "]</pre>\n"; if ($emsg !== null) { echo "<p><strong>FileManagerException('{$emsg}')!</strong></p>\n"; } echo "\n<hr />\n"; } ?> <h3>URI to abs & file path transform for options['directory'] based URIs</h3> <?php foreach ($test as $tc) {