Ben aşağıdaki kodu vardır:
$filecheck = basename($_FILES['imagefile']['name']);
$ext = substr($filecheck, strrpos($filecheck, '.') + 1);
if (($ext == "jpg" || $ext == "gif" || $ext == "png") && ($_FILES["imagefile"]["type"] == "image/jpeg" || $_FILES["imagefile"]["type"] == "image/gif" || $_FILES["imagefile"]["type"] == "image/png") &&
($_FILES["imagefile"]["size"] < 2120000)){
} else {
echo "F2";
die();
}
Ne yapmam gerekiyor yüklenen dosya jpg / gif / png ve boyut olarak daha da az 2 MB'lik eğer kontrol etmektir.
Onun daha büyük 2 megabite, veya doğru dosya türü, i / echo F2 (API için hata kodu) dönmek gerekir.
I 70k jpg dosyayı işlemek için yukarıdaki kodu kullandığınızda, F2 döndürür.
SUBNOTE the picture im uploading has an extension of .JPG. Could case be a factor? If so, how do i accommodate for that?