On Sunday 05 October 2003 17:15, Ruprecht Helms wrote:
> by uploading a file via the ftp_put-command the upload is not done
> properly. Result is I have a file in the destinationdirectory but
> 0 bit in size, only the filename is transfered.
>
> How have I to write the script that the file I want upload should
> be uploaded within the correct size. The actual script you can see
> here.
>
> [code]
>
>
> $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";
> $dstdir="html";
> $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/'
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Sometimes a cigar is just a cigar.
-- Sigmund Freud
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php