0

Is it possible to upload file types like ".psd", ".eps", ".zip", ".txt", and so on..?

And, can anyone recommend a PHP based upload handler script which also allows uploads of all kind of files?

3 Answers 3

3

An <input type='file' /> element on submit will allow uploading of all file types that I am aware of. The data will exist in your $_FILES super global array in PHP.

You likely will have some restrictions in your php.ini file, especially regarding file size.

Sign up to request clarification or add additional context in comments.

4 Comments

Can I change those file size restrictions?
Yeah. You can change the MEMORY_LIMIT value in php.ini for a permanent change. You can temporarily override the php.ini MEMORY_LIMIT by executing PHP's ini_set( 'MEMORY_LIMIT' ); function. See: php.net/manual/en/function.ini-set.php
@wescrow the upload_max_filesize may need changing too, the default is 2M this can only be changed in php.ini or using .htaccess
@RMcLeod You are absolutely correct. That is actually what I meant to reference. Although, both may need upped depending on their current settings.
3

Its possible to upload anything if you're using the standard file control <input type='file'>, its completely indiscriminate.

Obviously it's then down to what you have on your server as to what you can do with the file that's been uploaded,

Comments

1

Be careful with the file upload - you should restrict as much as you can, a minimalist approach, bad things can happen, like malicious intent. Spend time here, http://php.net/manual/en/features.file-upload.php, great scripts and commentary on how to handle/best practices.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.