about summary refs log tree commit diff
path: root/sourcecodes/reroute.php
blob: da1152ddace7fe26f0b673169c4b4c8737c7325e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
##
## Retrieve the file passed in the URL and send it to the browser.
## Set the $WORKDIR variable to point to the directory containing
## the files to be displayed.

$FILENAME = $_SERVER['QUERY_STRING'];
$WORKDIR = '/var/lib/genenet/bnw/';

if ( file_exists( $WORKDIR . $FILENAME ) )
{
    header("Content-type: text/plain");
    ##readfile($WORKDIR.$FILENAME);
    print file_get_contents( "file://" . $WORKDIR . $FILENAME, FALSE );
}
else
{
    echo " File " . $FILENAME . " not found in " . $WORKDIR . "\n";
}
?>