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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.