about summary refs log tree commit diff
path: root/sourcecodes/reroute.php
diff options
context:
space:
mode:
authorziejd22021-02-24 14:36:59 -0600
committerziejd22021-02-24 14:36:59 -0600
commit25b843f6bbacb1937bdb960777b73acbece64115 (patch)
tree88645b9d1d8a0eea19d7229555bf8805571bc8b7 /sourcecodes/reroute.php
parent33cedf36248f616aa37d1462c69a4a3058a5d92e (diff)
downloadBNW-25b843f6bbacb1937bdb960777b73acbece64115.tar.gz
GENENET8 update
Diffstat (limited to 'sourcecodes/reroute.php')
-rw-r--r--sourcecodes/reroute.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/sourcecodes/reroute.php b/sourcecodes/reroute.php
new file mode 100644
index 00000000..da1152dd
--- /dev/null
+++ b/sourcecodes/reroute.php
@@ -0,0 +1,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";
+}
+?>
+