aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-01-19 16:27:30 -0500
committerJesús <heckyel@hyperbola.info>2021-01-19 16:27:30 -0500
commit9157ff4195779fdbd2c69f4fce224110eafabe36 (patch)
treef0064bc9a5d3e45f297dfd98ae795aae25b76acd
parent930b0116d8fe387e2c80ab114cf902832eeb45b6 (diff)
downloadytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.tar.lz
ytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.tar.xz
ytexplode-9157ff4195779fdbd2c69f4fce224110eafabe36.zip
Remove unnecessary ROOT_PATH
-rw-r--r--index.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/index.php b/index.php
index 94ad0b3..6a744a8 100644
--- a/index.php
+++ b/index.php
@@ -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);
}