Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Tom-PC
  5.  * Date: 16/01/2018
  6.  * Time: 00:06
  7.  */
  8.  
  9. $calcType = $_POST['calcs'];
  10.  
  11. $fileName = $_FILES['Filename']['name'];
  12. $target = "C:\\xampp\htdocs\uploaded_files";
  13. $fileTarget = $target.$fileName;
  14. $result = move_uploaded_file($_FILES['Filename']['tmp_name'],$fileTarget);
  15.  
  16.  
  17. $python_script = "C:\\xampp\htdocs\python_scripts\Report.py";
  18.  
  19. echo $python_script;
  20. echo $calcType;
  21. echo $fileTarget;
  22.  
  23. $python = "python ".$python_script." ".$fileTarget." ".$calcType;
  24. $done = exec($python);
  25.  
  26. //header('Location: index.html');
  27. exit;
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement