do_upload([$field = 'userfile'])
Parameters: |
|
---|---|
Returns: |
TRUE on success, FALSE on failure |
Return type: |
bool |
Performs the upload based on the preferences you’ve set.
Note
By default the upload routine expects the file to come from a form field called userfile, and the form must be of type “multipart”.
1 | <form method= "post" action= "some_action" enctype= "multipart/form-data" /> |
If you would like to set your own field name simply pass its value to the do_upload()
method:
1 2 | $field_name = "some_field_name" ; $this ->upload->do_upload( $field_name ); |
Please login to continue.