I am a professional Web developer, Enterprise Application developer, Software Engineer and Blogger. Connect me on JEE Tutorials | TwitterFacebook Google PlusLinkedin | Reddit

13 thoughts on “Codeigniter Multiple Files Upload

  1. thanks a lot for your post
    if I want to add one input text, example : description.
    how about the model and the controller ?

    1. in the same way as other input fields are added to the form and submitted to the controller. just add another input field and get the value of the input field in the controller and then pass the value to the model.

  2. Why create and use the `assets_url()` helper function? In this article it is completely pointless since all it does is returns base_url(). It is adding an extra trip to memory to consume the assets_url() function and for no reason when instead you could avoid it and use base_url() in your views and not /assets. If you want a decent replacement for the assets_url() function, I would suggest using the following alternative instead.

    In assets_helper.php (>=PHP7):

    // If the function does not exist, let’s create it!
    if (!function_exists(‘assets_url’)) {
    * A syntactic sugar function to help load assets.
    * @param string|null $file The asset file to load
    * @param string $path The path for the asset
    * @return string The assets full `path`
    function assetsUrl(string $file = null, string $path = ‘assets’): string
    return base_url($path . ‘/’ . $file);

    The function above proves much more useful for accessing assets relative to your public directory/FCPATH.

    Other than this little “mistake” in your code, everything else is pretty decent. Thank you for the article.

Leave a Reply

Your email address will not be published. Required fields are marked *