Jump to content

[SOLVED] IE PHP ERROR???


ionik

Recommended Posts

PHP is supposed to be compatible  through all browsers no problems...??

 

Well i quess internet explorer has found a way to mess up everything...

 

I cannot upload images through Internet Explorer

 

when i try to it says my image type is invalid but it works fine on Firefox heres the snippet of code.

 

$allowed_ext_array = 'image/jpeg,image/gif';

$allowed_ext_array = explode(',', $allowed_ext_array);

$error_messages .= '';

foreach($allowed_ext_array as $allowed_ext)
{
	$strlen = strlen($allowed_ext) - 6;
	$names .= ' '.substr($allowed_ext, '6', $strlen);
}

if(!in_array($_FILES[$name]['type'], $allowed_ext_array))
{
	$error_messages .=  'Sorry, you are only allowed to upload '.$names.' file types'.'<br />';
}

 

dont know why this would happen....

Link to comment
https://forums.phpfreaks.com/topic/108409-solved-ie-php-error/
Share on other sites

First step of debugging -- echo the problem part:

 

if(!in_array($_FILES[$name]['type'], $allowed_ext_array))
{
	$error_messages .=  'Sorry, you are only allowed to upload '.$names.' file types'.'<br />';
                         echo $_FILES[$name]['type'];
}

Link to comment
https://forums.phpfreaks.com/topic/108409-solved-ie-php-error/#findComment-555755
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.