diff options
author | Jesús <heckyel@hyperbola.info> | 2021-01-19 16:27:30 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-01-19 16:27:30 -0500 |
commit | 9157ff4195779fdbd2c69f4fce224110eafabe36 (patch) | |
tree | f0064bc9a5d3e45f297dfd98ae795aae25b76acd | |
parent | 930b0116d8fe387e2c80ab114cf902832eeb45b6 (diff) | |
download | ytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.tar.lz ytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.tar.xz ytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.zip |
Remove unnecessary ROOT_PATH
-rw-r--r-- | index.php | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,15 +1,14 @@ <?php header('Content-Type: application/json; charset=utf-8'); -define('ROOT_PATH', preg_replace('/index.php/', '', $_SERVER["DOCUMENT_ROOT"].$_SERVER["DOCUMENT_URI"])); if (isset($_GET['id'])) { $id=$_GET['id']; // Delete sig file if is old 60 sec - if (is_file(ROOT_PATH.'sig.php')) { - $filelastmodified = filemtime(ROOT_PATH.'sig.php'); + if (is_file('sig.php')) { + $filelastmodified = filemtime('sig.php'); if((time() - $filelastmodified) > 60) { - unlink(ROOT_PATH.'sig.php'); + unlink('sig.php'); } } @@ -329,7 +328,7 @@ if (isset($_GET['id'])) { $patterns =$decipherPatterns; $deciphers =$deciphers; - if (!file_exists(ROOT_PATH.'sig.php')) { + if (!file_exists('sig.php')) { for ($i=0; $i < count($patterns); $i++) { $executes = explode('->', $patterns[$i]); $execute=explode('.', $executes[0]); @@ -353,7 +352,7 @@ if (isset($_GET['id'])) { break; } - $myfile = fopen(ROOT_PATH.'sig.php', "a+") or die("Unable to open file!"); + $myfile = fopen('sig.php', "a+") or die("Unable to open file!"); if ($i==0) { fwrite($myfile, '<?php $a = str_split($s);'); } @@ -382,7 +381,7 @@ if (isset($_GET['id'])) { $a[$b%count($a)] = $c; }; - include(ROOT_PATH.'sig.php'); + include('sig.php'); return join('',$a); } |