summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-02 21:42:24 +0200
committerErich Eckner <git@eckner.net>2017-07-02 21:42:24 +0200
commit782b1cb70d95e086fec42b1b2cc620dfffca955b (patch)
tree6b485c3d29bd609d4c1f088e18fa6f862531ea70
parent5ec3b8e6abb0c96f61207cf2bf8c87b7a4a5e8d1 (diff)
downloadsourceMirror-782b1cb70d95e086fec42b1b2cc620dfffca955b.tar.xz
mirror.php: use hack for large files, remove some comments
-rw-r--r--mirror.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/mirror.php b/mirror.php
index 783b86b..37c59c9 100644
--- a/mirror.php
+++ b/mirror.php
@@ -1,9 +1,5 @@
<?php
-// foreach ($_SERVER as $key => $value)
-// echo "'".$key."': '".$value."'<br>\n";
-// die();
-
function myBaseEncode(&$item, $key) {
$item = base64_encode($item);
if ($item == "")
@@ -70,14 +66,7 @@
pclose($inp);
}
else {
- $inp = fopen($pfad,"r");
- if (! $inp)
- die("Kann '".$quelle."' ('".$pfad."') nicht &oouml;ffnen!");
- while(!feof($inp)) {
- $buffer = fread($inp, 4096);
- print $buffer;
- }
- fclose($inp);
+ passthru('cat "'.$pfad.'"');
}
}