Advertisement
guitarman0831

Untitled

Jun 10th, 2011
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.    
  4.     $file = $_POST['file'];
  5.     $dir = '../uploads/store/';
  6.     $file = $dir . $file;
  7.    
  8.     opendir($dir);
  9.    
  10.     if(unlink($file)) {
  11.         echo "File sucessfully deleted";
  12.         $_SESSION['username'] = 'guitarman0831';
  13.         header('Refresh: 2;url=http://www.ohjustthatguy.com/uploads/uploads.html');
  14.     } else {
  15.         echo "Error: File could not be deleted";
  16.         $_SESSION['username'] = 'guitarman0831';
  17.         header('Refresh: 2;url=http://www.ohjustthatguy.com/uploads/uploads.html');
  18.     }
  19.  
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement