Guest User

Untitled

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function checkFile($nomeFile, $myExt = false){
  2. if($myExt != false){ $goodExt = "_$myExt"."_"; }else{ $goodExt = "_.jpg_.bmp_.zip_.pdf_.gif_.doc_.xls_.csv_.docx_.rar_"; }
  3. $punto = strrpos($nomeFile, '.');
  4. $ext = "_".substr($nomeFile, $punto, 8)."_";
  5. if(stristr($goodExt, $ext)){ return 1; }else{ return 0; }
  6. }
  7.  
  8. <?
  9. php passthru('file myfile.pdf', $return);
  10. echo $return;
  11. ?>
Add Comment
Please, Sign In to add comment