Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8645247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:30:03+00:00 2026-06-12T12:30:03+00:00

$config[‘file_name’] allows us to set the filename, while uploading files in CodeIgniter. Here we

  • 0

$config['file_name'] allows us to set the filename, while uploading files in CodeIgniter. Here we need to write the filename with the file extension. For example, filename.pdf or filename.zip. I want to set the filename, but the extension. So, if someone uploads a pdf file, the filename will be myfilename.pdf. And if someone uploads a zip file, the filename will be myfilename.zip.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:30:04+00:00Added an answer on June 12, 2026 at 12:30 pm

    start off the upload stuff in your controller like this and you can name it whatever you want. just replace ‘new_file_name’ with whatever you want it to be called. Make sure you change the do_upload() function variable to the name of your file input as well.

    if ($this->upload->do_upload('your_filename')) {
                $img_data=$this->upload->data();
                $new_imgname='new_file_name'.$img_data['file_ext'];
                $new_imgpath=$img_data['file_path'].$new_imgname;
                rename($img_data['full_path'], $new_imgpath);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are my config files, /etc/apach2/sites-availabled/currentcost <VirtualHost *:20108> ServerAdmin webmaster@localhost DocumentRoot /var/www WSGIScriptAlias /currentcost
Often while editing config files, I'll open one with vi and then when I
My config file is located here: ~/Admin/Web.config I tried opening it via the below
My config/locales/pl.yml file (sampled from here ): pl: date: day_names: [Niedziela, Poniedziałek, Wtorek, Środa,
In my .emacs config file I have a following entry: (custom-set-variables (custom-set-faces '(font-lock-comment-face ((((class
config.php put at the root level, this file will be included in any pages.
My config file looks like this: title = myTitle; otherTitle = myOtherTitle; when I
I'm watching the config files of my NodeJS server on Ubuntu using: for( var
My config file is really just a big python dict, but I have many
We have the following config in our POM file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.