All pastes #245627 Raw Edit

Mine

public php v1 · immutable
#245627 ·published 2006-11-11 05:03 UTC
rendered paste body
<?phpif ($_POST['upload']) {  // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead  // of $_FILES.  $uploaddir = '/var/www/uploads/';  $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);  echo '<pre>';  if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {     echo "File is valid, and was successfully uploaded.\n";  } else {     echo "Possible file upload attack!\n";  }  echo 'Here is some more debugging info:';  print_r($_FILES);  print "</pre>";}?><!-- The data encoding type, enctype, MUST be specified as below --><form action="<? print $PHP_SELF; ?>" method="post">    <!-- MAX_FILE_SIZE must precede the file input field -->    <input type="hidden" name="MAX_FILE_SIZE" value="30000000" />    <!-- Name of input element determines name in $_FILES array -->    Send this file: <input name="userfile" type="file" />    <input type="submit" name="upload" value="Send File" /></form>