Welcome Guest, Not a member yet? Register   Sign In
How to allow .php file uploads
#1

I am using codigniters built in file upload library, and I want to allow php files to be uploaded.

This facility is only available to admin users behind a secure login etc.


But for some reason, I am getting 'The filetype you are attempting to upload is not allowed' errors.

I have this in my controller:
Code:
$config['allowed_types'] = 'pdf|doc|docx|php';

And I also have this line in config/mimes.php:
Code:
'php'   =>  'application/x-httpd-php',

This actualy functionality works if i try to upload an image file etc, so it is working, just not allowing .php files.

Any ideas why this doesnt work? Am i missing something?
Reply


Messages In This Thread
How to allow .php file uploads - by frobak - 01-05-2016, 03:09 PM
RE: How to allow .php file uploads - by Narf - 01-05-2016, 05:09 PM
RE: How to allow .php file uploads - by skunkbad - 01-05-2016, 09:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB