• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The filetype you are attempting to upload is not allowed for uploading .php and .htm

#1
[eluser]Genuine Scope[/eluser]
mimes.php

Code:
'php' => 'application/x-httpd-php',
        'php'   =>      'text/html',
        'php4' => 'application/x-httpd-php',
        'php3' => 'application/x-httpd-php',
        'phtml' => 'application/x-httpd-php',
        'phps' => 'application/x-httpd-php-source',
        'php' =>      'text/php',
        'php' =>      'text/x-php',
        'php' =>      'application/php',
        'php' =>      'application/x-php',
        'html' => 'text/html',
        'htm' => 'text/html',
        'htm' => 'text/html',
        'shtml' => 'text/html',

in the controller allowed types were added as follows
Code:
$config['allowed_types'] = 'PHP|php|php4|php3|html|HTML|htm|HTM';

but cannot upload .php and .htm files

#2
[eluser]Aken[/eluser]
1) You're defining your mimes wrong. Multiple mime types for a single extension should be in an array. Just look at the original mimes.php file for an example.

2) It's possible that the mime type for the file is being adjusted or misinterpreted by your browser. You should double check what the mime type is that the class is receiving in case the issues still persist.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.