473,320 Members | 1,732 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,320 software developers and data experts.

ftp_put() can not upload file correctly on server. plz help

Hi!.
I used ftp_put( ftpstream , $remoteFile , $filePath , FTP_ASCII ) for first time. $remoteFile is the file name which I used to upload the file on server. $filePath is the path where is temporarily image is strored.
When I use this function , it shows successful and I can see file uploaded on the server.
But the uploaded image is not correctly uploaded on server and can not open.
Please somebody help.
Thanks
Mar 5 '10 #1
1 2323
Atli
5,058 Expert 4TB
Hey.

If it is an image, you should probably use FTP_BINARY as the fourth parameter.

If that doesn't work, show us more of the code. It's hard to figure out what is happening based on one line.
Mar 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joseph Markovich | last post by:
I'm trying to write a script for my users to be able to upload large files, and now I am unsure what exactly I am doing wrong. My script is based on the one in the PHP manual. <?php if(isset(...
1
by: balzano_1 | last post by:
Hi, im trying to upload a file from a client (windows) to an ftp server (linux), i deciede to use some of php`s functions to connect and authenticate etc.. i only wish to put a file on the server,...
2
by: Udo Pecher | last post by:
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...
5
by: tripwater | last post by:
Hello, I am having problems with the ftp_put() function. I can login via shell prompt. Does anyone know why the ftp_put() function may not work? I went to the php site and followed the...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
3
by: empiresolutions | last post by:
ftp_put() is not working. this is what i have. $host = "www.site.com"; $ftp_user_name = "username"; $ftp_user_pass = "password"; // declair files $remote_file = "ITS_BLI_0".$_POST.".csv";...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
4
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>...
0
by: sushil | last post by:
Hello Frnds, I am getting problem in uploading file from php script. The error is : Code - $upload = ftp_put($conn_id,$filemax,$src,FTP_BINARY); Output - Resource id...
1
by: PehJota | last post by:
I'm kinda new to PHP, and I'm trying to make a simple FTP upload script. It successfully connects to the server and logs in, but it can't upload. The transfer mode I use normally is ASCII (like I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.