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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:04:58+00:00 2026-06-01T13:04:58+00:00

I have a problem conserning uploading multiple files to my ftp server and I

  • 0

I have a problem conserning uploading multiple files to my ftp server and I am using jQuery’s multifile extension.

This is the multifile javascript code on page with the upload form (file_upload.php):

<script type="text/javascript">
    $(function(){ // wait for document to load 
     $('.remove').MultiFile({ 
        STRING: {
         remove: '<img src="images/upload-remove.png" height="16" width="16" alt="x"/>',
         denied:'You can't choose file $ext .\nTry again...',
         file:'$file',
         selected:'Chosen file: $file',
         duplicate:'This file is already chosen:\n$file'
        }
     }); 
    });
</script>

And this is the HTML form (file_upload.php):

<form name="uploader" action="file_upload2.php" method="post" enctype="multipart/form-data">
    <fieldset>
        <label for="file">Upload file:</label>
        <br />
            <input type="file" class="multi, remove" name="file[]" value="Upload file" />
            <input type="submit" value="submit"/>
    </fieldset>
</form>

The PHP part is where I don’t get it. I tried to do it with this code (file_upload2.php):

<?php
if(isset($_POST['submit']))
{
    $ftp_config['server'] = 'ftpserver.org'; //ftp host
    $ftp_config['username'] = 'ftp_username'; // ftp username
    $ftp_config['password'] = 'ftp_password'; // ftp user password
    $ftp_config['web_root'] = 'public_html'; //foldername from user home dir.

    $fileElementName = 'file[]'; //file field name

    $conn_id = ftp_connect($ftp_config['server']);
    $ftp_login = ftp_login($conn_id,$ftp_config['username'],$ftp_config['password']);

    if(!ftp_put($conn_id,$ftp_config['web_root'].'/'.$_FILES[$fileElementName]['name'],$_FILES[$fileElementName]['tmp_name'],FTP_BINARY)){
        $result = " Error occurred.  ";
    }else{
        $result = " File has been uploaded. ";
    }
    echo $result;
}
?>
  • 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-01T13:04:59+00:00Added an answer on June 1, 2026 at 1:04 pm

    You have to loop through $_FILES for each file that was uploaded.

    Do a print_r($_FILES); to see what you have to work with.

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

Sidebar

Related Questions

I have a problem concerning multiple file uploads in javascript. I am trying to
I have problem concerning python packages and testing. I'm writing an application using wx
I am using LaTeX and I have a problem concerning string manipulation. I want
I have a problem converting a string binary to a decimal I was using
I have a problem concerning Ajax and Jquery. I have a bunch of <li>
I have a small problem using log4j and FileAppender . When I am using
I have the following problem and don't know how to code it in R:
Sorry I have several question relative to the same problem. I am using Netbeans
i have the following problem concerning the index:: my source code:: <table style=width: 80%>
I have a problem with my webservice! As I render xml files just like

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.