tsave id separately - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
(HTM) git clone git://src.adamsgaard.dk/cosmo
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 9641d85821aab6fe0835e88a465846e77959ad57
(DIR) parent da1c3d90b78b1560d4894d257c7af6a2ed686ca9
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 29 Sep 2015 10:48:06 +0200
save id separately
Diffstat:
M uploadhistory.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/uploadhistory.php b/uploadhistory.php
t@@ -150,6 +150,7 @@ $fieldnames = array(
// Generate unique output file name
//$outputfile = tempnam('/tmp', 'cosmo_');
$outputfile = tempnam('/home/adc/cosmo/input', 'cosmo_');
+$id = explode('_', $outputfile)[1];
if (is_writable($outputfile)) {
if (!$handle = fopen($outputfile, 'w')) {
t@@ -193,9 +194,10 @@ if (!chmod($outputfile, 0777)) {
+
// Finally redirect user after processing uploaded data. This header function
// call must be before any output!
//header("Location: /~ad/cosmo");
-header("Location: /index.php?wait_id=". explode("_", $outputfile)[1]);
+header("Location: /index.php?wait_id=". $id);
?>