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

  • Home
  • SEARCH
  • 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 7782721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:37:47+00:00 2026-06-01T19:37:47+00:00

$ftp_server = ‘ftp.abc.com’; $remote_file = myvideo.avi; // file size 210MB $file = myvideo.avi; //

  • 0
$ftp_server = 'ftp.abc.com';
$remote_file = "myvideo.avi";  // file size 210MB
$file = "myvideo.avi";        // file size 210MB
$conn_id = ftp_connect($ftp_server);  // set up basic connection

// login with username and password
$login_result = ftp_login($conn_id, 'faraz@abc.com', 'password');

ftp_pasv($conn_id, true); // turn passive mode on
// 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 already edit php.in for
upload_max_filesize = 1024M

above snippet working on all types of file(s) upload,
but when am trying to upload a large size file then it upload on server but size varies after uploading.
A video file size-210MB on local-machine
but after upload, it displayed file size 328KB on FTP-server.
i have no idea where do i check, if someone has suggestion then i appreciates

  • 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-01T19:37:48+00:00Added an answer on June 1, 2026 at 7:37 pm

    Use FTP_BINARY instead of FTP_ASCII. The latter might stop at the first NUL byte.

    Besides that, there is no good reason to use ascii mode nowadays, even for ascii files. The only case where it’s important if you have cgi scripts containing a shebang line that have windows linebreaks locally.

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

Sidebar

Related Questions

I have an FTP server (abc.xyz.com), and I want to install CodeIgniter in the
My .NET WinForms application connects to ftp server and downloads a file. To do
I need to download file from FTP server and make some changes on it
Before downloading a file from ftp server, I want to check it if exist
I am downloading a file from an ftp server and saving it to the
I am trying to upload file to FTP server using php but it is
So far i wrote a code to download a file from ftp server then
I am downloading files from an FTP server. Some of the file names have
I was trying to connect with ftp server using ftp_connect() function of PHP as
I want to upload file from one server to another FTP server and following

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.