Codeigniter allow .php file uploads -
i using codigniters built in file upload library, , want allow php files uploaded.
this facility available admin users behind secure login etc.
but reason, getting 'the filetype attempting upload not allowed' errors.
i have in controller:
$config['allowed_types'] = 'pdf|doc|docx|php'; and have line in config/mimes.php:
'php' => 'application/x-httpd-php', this actualy functionality works if try upload image file etc, working, not allowing .php files.
any ideas why doesnt work? missing something?
figured out!!
when looked @ posted data, mime type content-type: text/php
but corresponding mime type in mime.php was:
'php' => 'application/x-httpd-php', so changed to:
'php' => array('application/x-httpd-php', 'text/php'), and worked.
hallelujah!!
Comments
Post a Comment