troubleshooting Question

Warning: ftp_put() [function.ftp-put]: Rename/move failure: No such file or directory

Avatar of MuhammadAdil
MuhammadAdilFlag for Pakistan asked on
PHPServer SoftwareNetworking Protocols
5 Comments1 Solution5688 ViewsLast Modified:
here is my code

PHP Code:
// set up basic connection

$ftp_server = "";
$ftp_user_name = "username";
$ftp_user_pass = "userpass";
$destination_file =
$source_file = "E:/My Web/Project/temp/";
$destination_file = "/home/{username}/public_html/";

$conn_id = ftp_connect($ftp_server);

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

// check connection
if ((!$conn_id) || (!$login_result)) {
        echo "FTP connection has failed!";
        echo "Attempted to connect to $ftp_server for user $ftp_user_name";
    } else {
        echo "Connected to $ftp_server, for user $ftp_user_name";

// upload the file
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

// check upload status
if (!$upload) {
        echo "FTP upload has failed!";
    } else {
        echo "Uploaded $source_file to $ftp_server as $destination_file";

// close the FTP stream

this code is taken from
i am getting this error
HTML Code:

Warning: ftp_put() [function.ftp-put]: Rename/move failure: No such file or directory

what i m doing wrong

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros