Mercurial > hg > extraction-interface
comparison interface/save_xml.php @ 0:b12c99b7c3f0
commit for previous development
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 19 Jan 2015 17:13:49 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b12c99b7c3f0 |
---|---|
1 <?php | |
2 | |
3 if ($_POST['require']){ | |
4 $date = date('Y_m_d_H_i_s', time()); | |
5 $oldFile = file_get_contents($_POST['filename']); | |
6 preg_match("/..\/bookindexxml\/(.*?).xml/u", $_POST['filename'], $matches); | |
7 file_put_contents("../bookindexxml/".$matches[1]."_".$date.".xml", $oldFile); | |
8 | |
9 if (get_magic_quotes_gpc()) { | |
10 $require = stripslashes($_POST['require']); | |
11 } else { | |
12 $require = $_POST['require']; | |
13 } | |
14 file_put_contents($_POST['filename'], $require); | |
15 } | |
16 | |
17 | |
18 ?> |