All pastes #402763 Raw Edit

Sani

public php v1 · immutable
·published 2007-03-20 00:11 UTC
rendered paste body
<?php   $tmp = explode ( '.', $_FILES['userfile']['name']);   $fileext = $tmp[count($tmp)-1];   $allowedexts = array("rpm", "gz", "tar", "bz2");   if (in_array($fileext, $allowedexts)) {      print "File is trusted.";   } else {      print "File not trusted!";   }?>