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

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

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.';
        $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.';
        # close the FTP stream

- Victor >

Post your ad for free now!

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to