note 20064 rejected from function.ftp-put by alindeman

From: Date: Thu, 21 Mar 2002 13:27:28 +0000
Subject: note 20064 rejected from function.ftp-put by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28038@lists.php.net to get a copy of this message
It's not working. Help me out! Everytime I got the message "File can't open" Here is my code: <?php $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"; die; } else { echo "Connected to $ftp_server, for user $ftp_user_name"; } $destination file="/home/www/myname" $source file="C:/windows/desktop/filename.doc"; $upload = ftp_put($conn_id, "$destination_file", "$source_file", FTP_BINARY); if (!$upload) { echo "Ftp upload has failed!"; } else { echo "Uploaded $source_file to $ftp_server as $destination_file"; } ftp_quit($conn_id); ?>

« previous php.notes (#28038) next »