Dosya finfo_file kullanarak dosya Myme-TİPİ bul

1 Cevap

Ben dosya MIME türünü bulmaya çalışıyorum PHP5.3.0 kullanarak hangi xampplite1.7.2 kullanıyorum. Ama onun bana hata veriyor:

Call to undefined function finfo_open()

Ben PHP Manual okumak onun PHP 5.3 ve bu fonksiyon desteği i PHP5.3 kullanarak o zaman neden bu hata ortaya xampplite1.7.2 kullanıyorum söz söylüyor. Ayrıca el

$ _FILES ['Resim'] ['type']

Which is showing me the type correctly. I am very confuse that many people i found told different ways to get MIME-TYPE by using Fileinfo and getimagesize() but none refers to $ _FILES ['Resim'] ['type']. What is the difference in all these functions. Actually i created doc file and then i changed it to JPG by changing its extension. My problem is that when i check the MIME type by using $ _FILES ['Resim'] ['type'] Its showing me image/jpeg is this showing the correct MIME_type and if i use other methods will they show me the correct type of this file which is a .doc file. Because i need to find a way to get the correct type of this file which was .doc. What are the ways to find solve this issue because i am keep trying to solve this issue sine last 24 hours but it seems very difficult to find MIME-type in PHP. i am not very exercised in working with PHP. SO please someone help me to solve this problem. Actually i want to find that the given file is a valid image file or not. Thanks

1 Cevap

Fileinfo.so PHP uzantısı (o WAMPServer 2 değil) varsayılan olarak etkin olmayabilir. Eğer o değil etkinleştirmek ve web sunucusu yeniden başlatın, etkin PHP uzantıları için xampplite yapılandırmayı kontrol edin.