M-A

upload3

M-A
Aug 8th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?
  2. /*
  3. + Title : simple upload code (Based on FILE TYPE)
  4. | Author : Mr_AnarShi-T
  5. + GaZa-HackeR.NeT
  6. # exit
  7. */
  8.  
  9. echo '<from method="POST" enctype="multipart/from-data" action="">
  10. Picture: <input type="file" name"picture">
  11. <input type="submit" name="1" value="Upload">
  12. </from>';
  13.  
  14. $alwd_ext = "image/jpeg";
  15.  
  16. if($_POST['1'] == 'Upload'){
  17.  
  18. if($FILES['picture'] ['type'] == $alwd_ext){
  19. $Upload = copy($FILES['picture'] ['tmp_name'], $FILES['picture'] ['name']);
  20.  
  21. echo ($Upload) ? "OK":"extention not compatible";
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment