Re: Trouble with uploading a file via ftp_put

From: Date: Sun, 05 Oct 2003 13:54:30 +0000
Subject: Re: Trouble with uploading a file via ftp_put
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-30841@lists.php.net to get a copy of this message
On Sun, 2003-10-05 at 11:39, Jason Wong wrote: > > $upload=ftp_put($conn_id,$bild,$dstdir."/".$bild,FTP_BINARY); > > > > [/code] > > 1) You've got your source-file and destination-file mixed up. > 2) You've already chdir into 'html' so destination-file so be just > '$bild' and > not '$dstdir."/".$bild'. Unless your directory structure really is > 'html/html/' actual I have the following script. I want to upload a image from the local pc into the subdir html of a webspace. The file I want to upload is not stored in the destinationdirectory. This is my actual script <? ... $conn_id=ftp_connect('62.241.50.14'); ftp_login($conn_id,'<user>','<password>'); echo "Current directory : ", ftp_pwd($conn_id), "\n"; //ftp_chdir($conn_id,"html"); echo "Current directory is now : ", ftp_pwd($conn_id), "\n"; echo "<br>Bilddatei "; echo $bild; $upload=ftp_put($conn_id,'html'+$bild,$bild,FTP_BINARY); ?>

« previous php.db (#30841) next »