Mercurial > hg > extraction-interface
comparison interface/save_word_list.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['text']){ | |
4 $date = date('Y_m_d_H_i_s', time()); | |
5 if ( file_exists("wordlist/".$_POST['filename'].".txt") ) { | |
6 $oldFile = file_get_contents("wordlist/".$_POST['filename'].".txt"); | |
7 file_put_contents("wordlist/".$_POST['filename']."_".$date.".txt", $oldFile); | |
8 } | |
9 | |
10 if (get_magic_quotes_gpc()) { | |
11 $require = stripslashes($_POST['text']); | |
12 } else { | |
13 $require = $_POST['text']; | |
14 } | |
15 $require = preg_replace("/<br>/u", "", $require); | |
16 file_put_contents("wordlist/".$_POST['filename'].".txt", $require); | |
17 } | |
18 | |
19 | |
20 ?> |