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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php