PHP ftp function File Upload _php tutorial

Source: Internet
Author: User
Tags ftp connection php file upload
Many other times we will not be used for PHP ftp function file Upload Oh, but there are in the use of more advanced Web applications will be used in the FTP function, such as I now upload the image of the B server, data saved to a server, ordinary PHP file upload instance can not, But with the FTP function can be a convenient example.

Many other times we will not be used for PHP tutorial ftp function File Upload Oh, but there are in the use of more advanced Web applications will be used in the FTP function, such as I now upload the image of the B server, data saved to a server, ordinary PHP file upload instance can not, But with the FTP function can be a convenient example.

Defining variables
$local _file = ' local.zip ';
$server _file = ' server.zip ';
Connecting to an FTP server
$conn _id = ftp_connect ($ftp _server);
Verifying the logon server
$login _result = Ftp_login ($conn _id, $ftp _user_name, $ftp _user_pass);
Download file
if (Ftp_get ($conn _id, $local _file, $server _file, ftp_binary)) {
echo "Download $local _file file Success n";
} else {
echo "Download failed n";
}
Close FTP connection
Ftp_close ($conn _id);
?>


http://www.bkjia.com/PHPjc/445457.html www.bkjia.com true http://www.bkjia.com/PHPjc/445457.html techarticle Many other times we will not be used for PHP ftp function file Upload Oh, but there are in the use of more advanced Web applications will be used for the FTP function, such as I will now upload the image of the B server ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.