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 = "
" . file_get_contents($readmefile) . "
"; } else { // If no readme, show URI. $pathtext = "
$uri
"; } ?> <?=$titletext?>

      Name                    Last modified      Size  Description
Parent Directory - 2 women in lingerie.jpg 31-Jul-2009 07:11 2.7M Audrey 90 wallace st..> 31-Jul-2009 07:21 3.2M bildzwei.jpg 07-Mar-2012 18:07 1.0M hayden @ rose st chi..> 31-Jul-2009 07:23 2.0M sam headshot.jpg 31-Jul-2009 07:25 1.0M sam posture02.jpg 31-Jul-2009 07:48 2.8M sam posture03.jpg 31-Jul-2009 07:49 2.5M woman in velvet jack..> 31-Jul-2009 07:50 1.8M