tag. %DIR is replaced with the directory path. // for instance: // $titleformat = "antisleep: %DIR"; $titleformat = "three words %DIR"; //======================================================================= // (end of config) //======================================================================= $uri = urldecode($_SERVER['REQUEST_URI']); $uri = preg_replace("/\/ *$/", "", $uri); $uri = preg_replace("/\?.*$/", "", $uri); $titletext = str_replace("%DIR", $uri, $titleformat); // this is hacky, but in almost every situation there's no real harm. // it just might fail if you're doing something funky with directory mappings. $readmetext = ""; $pathtext = ""; $readmefile = $_SERVER["DOCUMENT_ROOT"] . $uri . "/readme.html"; if ($show_readme && file_exists($readmefile)) { $readmetext = "
Name Last modified Size Description
Parent Directory - du2406.pdf 30-Jun-2011 00:15 305K du2406a.pdf 30-Jun-2011 00:15 305K du3006a.pdf 30-Jun-2011 00:17 757K du3006b.pdf 30-Jun-2011 00:17 122K rogering exhaust.ind..> 17-Sep-2009 03:33 3.5M