Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFile($nomeFile, $myExt = false){
- if($myExt != false){ $goodExt = "_$myExt"."_"; }else{ $goodExt = "_.jpg_.bmp_.zip_.pdf_.gif_.doc_.xls_.csv_.docx_.rar_"; }
- $punto = strrpos($nomeFile, '.');
- $ext = "_".substr($nomeFile, $punto, 8)."_";
- if(stristr($goodExt, $ext)){ return 1; }else{ return 0; }
- }
- <?
- php passthru('file myfile.pdf', $return);
- echo $return;
- ?>
Add Comment
Please, Sign In to add comment