PHP | Upload Fonksiyonu


        $dir; //upload edilecek yer
        $file; //input un değeri
 function resimupload($dir, $resim){
   $img = $_FILES[$resim]['tmp_name'];
   $imgg = $_FILES[$resim]['name'];
   $resimi_bolme = explode(".", $imgg);
   $uzanti = end($resimi_bolme);
   $imgSon = $dir.md5($imgg).".".$uzanti;
   move_uploaded_file($img, $imgSon);
  return $imgSon;
 
 }

Hiç yorum yok:

Yorum Gönder

 

Sample Text

Sample Text