Advertisement
Guest User

Untitled

a guest
May 20th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
  3. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  4. header('Cache-Control: no-store, no-cache, must-revalidate');
  5. header('Cache-Control: post-check=0, pre-check=0', FALSE);
  6. header('Pragma: no-cache');
  7.  
  8. if(isset($_GET['uniqueID'])){
  9.    $progress = apc_fetch('upload_' . $_GET['uniqueID']);
  10.    echo round($progress['current']/$progress['total']*100);
  11. } else {
  12.     die('no id');
  13. }
  14.  
  15. $filepath = "tmp/";
  16. $filepath = $filepath . basename( $_FILES['myfile']['name']);
  17. move_uploaded_file($_FILES['myfile']['tmp_name'], $filepath);
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement