Title="_(Index of)_ $dir" Tag="navicon" Markdown="false" --- function cap($dir,$p) { return mb_substr($dir,$p,1)=='/' ? '/' : ''; } function truepath($dir) { $dir = preg_replace('://+:','/',htmlspecialchars_decode($dir)); $bits = array_filter(explode('/',$dir),'mb_strlen'); $path = []; foreach ($bits as $bit) { if ($bit=='.') continue; if ($bit=='..') array_pop($path); else $path[] = $bit; } return cap($dir,0).implode('/',$path); } $dir = htmlspecialchars(str_replace('\\','\\\\',truepath($dir))); ?>
| _(Type)_ | _(Name)_ | _(Size)_ | _(Last Modified)_ | _(Location)_ |
|---|---|---|---|---|