Advertisement
MizunoBrasil

upload simples de arquivos

Dec 25th, 2022
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['img_submit'])){
  3.    
  4.     $img_name=$_FILES['img_upload']['name'];
  5.     $tmp_img_name=$_FILES['img_upload']['tmp_name'];
  6.     $folder='upload/';
  7.     move_uploaded_file($tmp_img_name, $folder.$img_name);
  8. }
  9.  
  10. ?>
  11. <form action='' method='POST' enctype='multipart/form-data'>
  12. <input type='file' name='img_upload'><br><br>
  13. <input type='submit' name='img_submit'>
  14. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement