continuation to the ftp story

From: Date: Tue, 03 Sep 2002 20:59:22 +0000
Subject: continuation to the ftp story
Groups: php.general 
Request: Send a blank email to php-general+get-115087@lists.php.net to get a copy of this message
The problem with my other php - well - problem was that the destination and file variables were reversed, I think, no I changed them, but I get this error when I try to ftp a file to a server: Warning: ftp_put(): error opening /home/victor/sites/kodak/user_pictures/vic Can user permissions cause this error? I also tried appending a '/' after the destination, but my error now read s as: Warning: ftp_put(): error opening /home/victor/sites/kodak/user_pictures/vic/ It also brakes at: echo 'FTP upload has failed.'; so that's where the problem is, I just don't know what the problem is. The ftp code is this: if someone could help it'd be nice. # set up basic connection $conn_id = ftp_connect($ftp_server) or die ('Could not establish FTP connection'); # login with username and password $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass) or die ('Could not login'); # check connection if ((!$conn_id) || (!$login_result)) { echo 'FTP connection has failed.'; exit; } $destination = $picture_location.$f_username.'/'; # upload the file $upload = ftp_put($conn_id, $picture, $destination, FTP_BINARY); # check upload status if (!$upload) { echo 'FTP upload has failed.'; exit; } # close the FTP stream ftp_close($conn_id); - Victor > www.argilent.com ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

« previous php.general (#115087) next »