Created
August 3, 2012 20:23
-
-
Save mmccollow/3251210 to your computer and use it in GitHub Desktop.
extractFits function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function extractFits($parameterArray, $dsid, $file, $file_ext) { | |
$file_name = $file .'_'. $dsid .'.xml'; | |
$output = array(); | |
exec('fits.sh -i '. escapeshellarg($file) .'', $output); | |
if ( !file_put_contents($file_name, implode("\n", $output)) ) { | |
exit("Error writing file: ". $file_name); | |
} | |
$_SESSION['fedora_ingest_files']["$dsid"] = $file_name; | |
return TRUE; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment