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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:32:02+00:00 2026-05-31T00:32:02+00:00

I am trying to move an uploaded file onto a remote server, this isn’t

  • 0

I am trying to move an uploaded file onto a remote server, this isn’t working;

move_uploaded_file($tmp_name, “uploads/$code1/$code.$fileex”);

$ftp_server = "IP";
$ftp_user_name = "username";
$ftp_user_pass = "password";
$file = $tmp_name;
$remote_file = "/public_html/test/uploads/";

// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
 echo "successfully uploaded $file\n";
} else {
 echo "There was a problem while uploading $file\n";
}

// close the connection
ftp_close($conn_id);

I get this erorr;

Warning: ftp_put() [function.ftp-put]: Can’t open that file: Is a directory in /home/file/public_html/uploaded.php on line 52

  • 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-31T00:32:04+00:00Added an answer on May 31, 2026 at 12:32 am

    Your $remote_file variable is pointing to a directory when it should point to a file. Try changing $remote_file to $remote_file = "/public_html/test/uploads/".$file;

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

Sidebar

Related Questions

Quick question I am trying to move an uploaded file to a directory outside
I am trying to upload image file from my one server to another remote
Trying to move some divs using hover, this is my markup: <div class=item dark-grey>
I'm trying to move a file but I want to ensure that it exists
I'm trying to move a control from one parent to another (if this will
I'm trying to upload a file to my server using the CakePHP file upload
I am trying to save an uploaded image from an iPhone to a server
I am trying to upload file using php. I am using the function move_uploaded_file.
Is it possible to store the uploaded file by move_uploaded_file to a directory and
I'm trying to implement this method of making a nice form upload: www.kavoir.com/2009/02/styling-file-upload-select-input-control-input-typefile.html/ which

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.