-
Book Overview & Buying
-
Table Of Contents
CodeIgniter 2 Cookbook
By :
CodeIgniter comes with very good file uploading support, which can take a lot of the hassle out of writing upload functions.
There are some settings you should be aware of which you'll probably need to change for your environment. Firstly, ensure that you load the upload library using:
$this->load->library('upload'); The following is a table of settings that should be placed in the $config array in the controller you are using, such as the following Fileupload controller:
|
Setting |
Default |
Change to |
Description |
|---|---|---|---|
|
|
None |
None |
It specifies the path to the folder where the uploaded file should go. Ensure that you have set the correct permissions to enable CodeIgniter to write to it. |
|
|
None |
None |
It specifies the allowed mime types, which are allowed in the upload. This can be useful as it allows you to white list uploaded file types; that is, it allows you to define only allowed types. You should separate each... |
Change the font size
Change margin width
Change background colour