" . $regexp . "\n"; // echo "$f \n"; echo "error: file '$f' not found."; exit; } $fileName = $matches[4]; if ($matches[2]) { $category = $matches[2]; $folder = $matches[3]; $inpRunDownTable = getInpRunDownloadData(); $inpRunDownTable[$category . "/" . $folder . "/" . $fileName]['down']++; writeInpRunDownloadData($inpRunDownTable); } header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header('Content-Description: File Transfer'); header("Content-Type: application/octet-stream"); header("Content-Length: " . (string)(filesize(EPR_ROOT . $f))); header("Content-Disposition: attachment; filename=\"{$fileName}\""); //header("Content-Length: ".$content_length); $content = file(EPR_ROOT . $f); foreach ($content as $line) { echo $line; } ?>