Re: ftp to a remote address data from post

From: Date: Sun, 15 Sep 2002 12:47:55 +0000
Subject: Re: ftp to a remote address data from post
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116436@lists.php.net to get a copy of this message
You have to precise the filename destination like dummy/name.extension. -- Nicos - CHAILLAN Nicolas nicos@php.net www.WorldAKT.com - Hébergement de sites Internet "Victor" <victor@argilent.com> a écrit dans le message de news: 000001c25c5f$2100bc20$a3a96518@jumpy... > I am trying to get ftp working and it takes the data from post ok, but > the only way I got it to work is if it uploads to the root folder of my > web space provider. Any other attempt at describing a more accurate > address or remote address has failed. > > This is the code that I use: (mostly straight from the php > documentation) > > # 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 = 'dummy/'; > # upload the file > $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY); > > # check upload status > if (!$upload) { > echo 'FTP upload has failed.'; > exit; > } > > - the above code is the one that uploads the file, but it puts it in the > root folder and it names it "dummy". > > What am I doing wrong? > > - Victor > www.argilent.com > > > ______________________________________________________________________ > Post your free ad now! http://personals.yahoo.ca

« previous php.general (#116436) next »