Using PHP to control FTP upload files The problem has been simplified into the simplest of the code why is there still an exception?

Source: Internet
Author: User
Tags ftp upload file
Using PHP to control the FTP upload file problem has been simplified to the simplest code why still have errors???
$file = ' aaa.txt ';//files under the root directory
$remote _file = ' aaa1.txt ';//remote file

$conn _id = Ftp_connect ($server);

$login _result = Ftp_login ($conn _id, $username, $password);

FTP_PASV ($conn _id, true);

if (Ftp_put ($conn _id, $remote _file, $file, ftp_binary,0)) {
echo "successfully uploaded $file \ n";
}
else {
echo "There is a problem while uploading $file \ n";
}

Ftp_close ($conn _id);

Error message: Warning:ftp_put () [Function.ftp-put]: Aaa.txt:Access is denied. In D:\Program files\appserv\www\wx\ftp.php on line 63
There is a problem while uploading aaa.txt

------Solution--------------------
Access is denied
Access is denied.

------Solution--------------------
Aaa.txt to change the permissions of this file. To make it readable, writable, ...
------Solution--------------------
Does the ftp_put have the same name overlay feature? The image does not have
------Solution--------------------
Warning:ftp_put () [Function.ftp-put]: Aaa.txt:Access is denied. Permissions issues
------Solution--------------------
It is clear that Wood has the right to take part in the speeches of NPC representatives
  • 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.