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 5961833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:01:17+00:00 2026-05-22T19:01:17+00:00

I have a file input element which generate by ajax/jquery.load(). and when I want

  • 0

I have a file input element which generate by ajax/jquery.load(). and when I want to move the uploaded file, I got an error that says I have no file to upload.

I tried it with CI file uploading class and php move_uploaded_files(), but it return the same error..

Here’s my code with CI

$config['upload_path'] = './'.$uploadpath.'/answer';
$config['allowed_types'] = '*';
$config['max_size'] = '2048';
$config['file_name'] = $probid.".ans";
$this->load->library('upload', $config);
if(!$this->upload->do_upload("contanswer".$i))
{
//do some error handling
}

Here’s my code with php move_uploaded_files

move_uploaded_file($_FILES["continput".$i]["tmp_name"], $uploadpath.'/input');

FYI, $i is an index variable, because I’ve some file input element on my page..

Am I missing something in my code??
thx

  • 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-05-22T19:01:18+00:00Added an answer on May 22, 2026 at 7:01 pm

    try to get the full $_FILES array and check if you are getting the values right:

    print_r($_FILES);
    

    then see what values you get from the form, maybie there is some typo in the name? also check the $i variable value, maybie it starts from different value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an input file that I want to sort based on timestamp which
I have a file input element that needs to be cloned after the user
In the filesystem I have /file.aspx /directory/default.aspx I want to configure IIS so that
So I have an input file that uses my company's namespace in the default
I have a file input field with opacity: 0; and filter: alpha(opacity: 0); that
I have this code, which reads in input from a file and stores it
Say I have an input file, and a target directory. How do I determine
I have an XML input file and I'm trying to output the result of
I need to delete my input file securely once I have finished with it,
Is there any way to have a Windows batch file directly input SQL statements

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.