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

[DIR] Parent Directory 21-Aug-2010 18:21 - [DIR] meeting/ 17-Sep-2009 03:47 - [DIR] that/ 17-Sep-2009 03:46 - [DIR] this/ 17-Sep-2009 03:46 -