All pastes #605315 Raw Edit

Something

public php v1 · immutable
·published 2007-07-06 02:49 UTC
rendered paste body
Options +IndexesIndexIgnore index_designIndexOptions SuppressHTMLPreamble DescriptionWidth=* XHTMLIndexOptions IconHeight=22 IconWidth=20 FancyIndexing TrackModifiedRemoveHandler .plAddType text/html .phpHeaderName /detergent/index_design/header.phpReadmeName /detergent/index_design/footer.php# relevant php from header.php:  <?php    $directories = explode('/', $_SERVER['REQUEST_URI']);    $previous_link = "/"; $linked_path = '';    foreach ($directories as $directory) {      if ($directory == '') { continue; } // ignore queries.      if (strpos($directory, '?') !== FALSE) { continue; }      $previous_link = "$previous_link$directory/"; // hoo-hah!      $linked_path .= '/<a href="'. $previous_link .'">'. $directory .'</a>';    } $linked_path = rtrim($linked_path, "/")  ?>  <h1>Index of <?php print $linked_path; ?></h1>  <?php    $filename = $_SERVER['DOCUMENT_ROOT'] . strip_tags($linked_path) .'/HEADER.html';    if (file_exists($filename) && $handle = fopen($filename, "r")) {      print fread($handle, filesize($filename)); fclose($handle);    }  ?>