$file = "test.txt"; $ftp_server = "servename "; $ftp_user_name = "username"; $ftp_user_pass = "password"; $destination_file = $file; $source_file = "DOCUMENT_ROOT".$file; // set up the FTP connection $conn_id = ftp_connect("$ftp_server"); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); 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"; } echo ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); // 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 ftp_close($conn_id); PHP: When i run this script i am getting the error message as "NO SUCH FILE OR DIRECTORY ". Why i am getting this error ? Please advice me. Thanks in advance.