By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,674 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

ftp_put "does not work for" jpg, bmp, gif ...

P: n/a
I apply the following code

test.php
$upload =ftp_put($conn_id,"test.jpg","$dat",FTP-BINARY);

where $dat is a local filename which I like to move via FTP. "test.jpg" ist
the filename on the Web-Server. I start this php-code from HTML with

<FORM ENCTYPE="multipart/form-data" ACTION="test.php" METHOD=POST >
.....

When I reload test.jpg from the webserver the file has always the size of 1
KB and it is not possible to view it again.

What can I do? Thanks for your effort in advance!

Udo Pecher aus HOF a.d. Saale / Germany
I
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sun, 4 Jul 2004 22:11:31 +0200, "Udo Pecher" <ba*********@t-online.de>
wrote:
test.php
$upload =ftp_put($conn_id,"test.jpg","$dat",FTP-BINARY);


Is that really waht you have (in which case "FTP minus BINARY" probably isn't
the same as FTP_BINARY , or is that a typo in posting it here (in which case
always cut and paste your code to avoid introducing more confusion).

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2

P: n/a

"Andy Hassall" <an**@andyh.co.uk> >
test.php
$upload =ftp_put($conn_id,"test.jpg","$dat",FTP-BINARY);
Is that really waht you have (in which case "FTP minus BINARY" probably

isn't the same as FTP_BINARY , or is that a typo in posting it here (in which case always cut and paste your code to avoid introducing more confusion).


This hits the point. Now it works correctly!

Udo Pecher
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.