require_once("eprConst.inc"); require_once("eprUtil.inc"); // ブラウザ内にテキストとして表示させる $f = $_GET['f']; $regexp = "=^(" . EPR_OUT_DIR . '[0-9]{8}_[0-9]{6}_[0-9]{8}/|' . INP_URL . '(' . join('|', $CATEGORY_LIST) . ')/[^/]+/)([^/]+\.(inp|INP|out|OUT|plt|PLT))$='; if (! preg_match($regexp, $f, $matches) || ! is_readable(EPR_ROOT . $f)) { // echo "
" . $regexp . "\n"; // echo "$f\n"; echo "error: file '$f' not found."; exit; } $fileName = $matches[3]; header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: text/plain"); header("Content-Disposition: inline; filename=\"{$fileName}\""); header("Content-Length: ". (string)(filesize(EPR_ROOT . $f))); readfile(EPR_ROOT . $f); ?>