Mercurial > hg > webaudioevaluationtool
comparison save.php @ 1238:8c56eda17acd
Error levels should be set before messing around with timezone, as that may trigger warnings on some systems
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 06 Mar 2016 20:55:00 +0000 |
parents | 124e6c702845 |
children | 987ccc04250b |
comparison
equal
deleted
inserted
replaced
1237:164bf95acf95 | 1238:8c56eda17acd |
---|---|
1 <?php | 1 <?php |
2 error_reporting(0); | |
2 try{ | 3 try{ |
3 date_default_timezone_get(); | 4 date_default_timezone_get(); |
4 } | 5 } |
5 catch(Exception $e){ | 6 catch(Exception $e){ |
6 date_default_timezone_set('UTC'); // Sets to UTC if not specified anywhere in .ini | 7 date_default_timezone_set('UTC'); // Sets to UTC if not specified anywhere in .ini |
7 } | 8 } |
8 header('Access-Control-Allow-Origin: *'); | 9 header('Access-Control-Allow-Origin: *'); |
9 header("Content-type: text/xml"); | 10 header("Content-type: text/xml"); |
10 error_reporting(0); | |
11 $postText = file_get_contents('php://input'); | 11 $postText = file_get_contents('php://input'); |
12 $sha1_hash = sha1($postText); | 12 $sha1_hash = sha1($postText); |
13 $datetime = date('ymdHis'); | 13 $datetime = date('ymdHis'); |
14 $xmlfile = "save".$datetime."-".$sha1_hash.".xml"; | 14 $xmlfile = "save".$datetime."-".$sha1_hash.".xml"; |
15 $fileHandle = fopen("saves/".$xmlfile, 'w'); | 15 $fileHandle = fopen("saves/".$xmlfile, 'w'); |