jackmalanweb Posted December 17, 2016 Share Posted December 17, 2016 Hey Larry If i use PHP upload images format ,Do i need to write all the image formats code。learning PHP need to learn algorithms? i do not know. Thanks Jack Link to comment Share on other sites More sharing options...
Larry Posted December 19, 2016 Share Posted December 19, 2016 Sorry, I'm not following what you mean by "PHP upload images format". Could you explain what you're trying to do in more detail? Link to comment Share on other sites More sharing options...
jackmalanweb Posted December 20, 2016 Author Share Posted December 20, 2016 Hey Larry Sorry,i am want to express check the uploaded file has the correct type。 $allowed=array('image/pjpeg','image/jpeg','image/JPG','image/X-PNG','image/PNG','image/png','image/x-png'); There are many image formats,for example JPEG,PNG,bmp,gif and so on I do not know whether the php code needs to contain all the image formats Link to comment Share on other sites More sharing options...
Max Posted December 21, 2016 Share Posted December 21, 2016 Hi Jack You can change that line of code to read (in the case of JPGs only): $allowed=array('image/pjpeg','image/jpeg','image/JPG'); Link to comment Share on other sites More sharing options...
jackmalanweb Posted December 24, 2016 Author Share Posted December 24, 2016 Hi Max Thank you Merry Christmas,Max! Merry Christmas,Larry! Link to comment Share on other sites More sharing options...
Larry Posted December 31, 2016 Share Posted December 31, 2016 Thanks, Max! Merry Christmas/Happy Holidays, all! Link to comment Share on other sites More sharing options...
Recommended Posts