son.of.the.morning Posted September 9, 2010 Share Posted September 9, 2010 http://dvplus.webuda.com/testing/delete-image.php When i try and upload and image with this page i=n safrie it works fine but in iexplorer it doesnt :S any idears on what that is? Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/ Share on other sites More sharing options...
The Eagle Posted September 9, 2010 Share Posted September 9, 2010 Worked for me in IE7. Most of the time IE parses CSS code differently (and stupidly) than other web browsers like Chrome, Firefox, Safari, Opera. They process it right, IE is different. Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109284 Share on other sites More sharing options...
PFMaBiSmAd Posted September 9, 2010 Share Posted September 9, 2010 Your error checking and error reporting logic in your code should tell you why the upload is failing so that you don't have to guess. Best guess is that you are checking the mime type and different browsers send different mime types for the same file (actually some send a more correct mime type, others send a more general mime type.) Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109285 Share on other sites More sharing options...
son.of.the.morning Posted September 9, 2010 Author Share Posted September 9, 2010 mime??? Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109297 Share on other sites More sharing options...
fortnox007 Posted September 9, 2010 Share Posted September 9, 2010 If its css that is causing problems....check out if you have got a !doctype in your script? if not make it a custom. ie. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109307 Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Author Share Posted September 10, 2010 That doesn’t seem to be the problem, do you think it has something to do with the file extension, because when it's not working for me on IE it's saying the error which i coded to come up when the file extension is invalid. Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109522 Share on other sites More sharing options...
PFMaBiSmAd Posted September 10, 2010 Share Posted September 10, 2010 If your current code is related to the upload code you have posted on the forum previously, the code that is testing the ['type'] element of the $_FILES array is not testing the file extension, it is testing the mime type that the browser supplies and someone previously stated in this thread why you might get different values from different browsers for the same file. You would both need to display the value you are receiving as part of the error message and add it as one of the permitted types. Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109611 Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Author Share Posted September 10, 2010 I read up on it got it sorted by extenend the possible correct values... insead of this if ((($_FILES["file"]["type"] == "image/jpeg")[code=php:0] /// just having one possible extention to .... [code=php:0]if ((($_FILES["file"]["type"] == "image/jpeg") ||($_FILES["file"]["type"] == "image/jpg") ||($_FILES["file"]["type"] == "image/png") ||($_FILES["file"]["type"] == "image/x_png") ||($_FILES["file"]["type"] == "image/pjpeg"))) [/code] works like a charm now, thanks for help much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109672 Share on other sites More sharing options...
PFMaBiSmAd Posted September 10, 2010 Share Posted September 10, 2010 When you have a list of possible values, it is better to put them into an array and use in_array to test if your value is anyone of the permitted values. Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109675 Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Author Share Posted September 10, 2010 Never realy used an array in php before Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109677 Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Author Share Posted September 10, 2010 Can people try this tell me what they get in responce of an upload. http://dvplus.webuda.com/testing/delete-image.php thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/212988-working-in-safri-but-not-in-iexplorer/#findComment-1109724 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.