473,387 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
2 2609
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: avihaimar | last post by:
hello i have the code below: <html> <body> <table> <div id="div1" style="display :none"> <tr> <td> uuu </td>
4
by: Kerem Gümrükcü | last post by:
Hi, i am about to burst!!! how can i make my string break inside a textbox? i mean with a control charater like "\n", but it does not work! i have a string and i must set the wrap manuall, not...
3
by: nsh | last post by:
mailing.database.mysql, comp.lang.php subject: does "LOAD DATA" EVER work?!? I've tried EVERYTHING! version info: my isp is running my web page on a linux box with php ver. 4.4.1 according to...
5
by: mkaushik | last post by:
Hi everyone, Im just starting out with C++, and am curious to know how "delete <pointer>", knows about the number of memory locations to free. I read somewhere that delete frees up space...
2
by: Jeff | last post by:
hey asp.net 2.0 (C'#) In the code behind file I have this method: public String AddBR(Object param) { String text = (String) param; return text; }
1
by: DougFAI | last post by:
Hello there. Today, I was developing a college work software and then I saw thoe 2 types of while. My teacher asked me how does the "while(ifs)" (considering my ifstream was ifs) (that was the one...
5
by: Faizmysore | last post by:
This code works good in IE, function multiuser() { document.frmOpenInteraction1.Create.disabled=true; document.frmOpenInteraction1.hidmultiuser.value="Yes"; var r =...
2
by: phpfreak2007 | last post by:
Hello all, I am Using textboxes inside Panel Control.. But it does allow me to Copy data using Cntl+c and not even allow Paste using Cntrl+V.. Rather i can Copy paste using popup menu displayed by...
4
by: lander | last post by:
I've read the page life cycle thing in msdn, still, i'm getting a bit confused of thinking how all the things are going under the hood... I know that when page loading, that the controls'...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.