473,326 Members | 2,081 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,326 software developers and data experts.

ftp_get save the file in the ServerSide

Sorry about my english but it´s not my first lenaguage.

i got a problem using ftp_get. My FTP server is working properly (I can upload and download files to it) but when I try to download a File using PHP code doesn´t seems work. The file is saved in the ServerSide instead clientSide. this is a portion of my code. $Local and $Remoto has the same name of file, without path, but don´t work wether add a path or not to $Local
I would appreciate some help.
thanks in Advance

Expand|Select|Wrap|Line Numbers
  1. function DescargarArchivos($Local, $Remoto)
  2. {        
  3.         $cid = ftp_connect("192.168.1.84");    
  4.         $resultado = ftp_login($cid, "anonymous", "");    
  5.         ftp_chdir($cid, "mauricio");    
  6.         $Descarga = ftp_get($cid, $Local, $Remoto, FTP_BINARY);
  7.         if($Descarga)
  8.         {
  9.             echo "download ssuccesfull";
  10.         }
  11.         else
  12.         {
  13.             echo "download not succesfull";
  14.         }
  15. }
  16.  
Jul 28 '08 #1
1 1634
Atli
5,058 Expert 4TB
Hi. Welcome to Bytes!

Are you getting any errors?
If not, try the suggestions in this thread and see if that turns anything up.

P.S.
I notice that some of your code is written in another language. This is a very bad thing to get used to. What if you code were ever to be read by somebody that doesn't speak your language?
Having english as a 3rd language, I've cought myself doing this from time to time, but it can cause some seriouse problems.
It's just best, for everybody's sake, to always write programs in English, so there can be no confusion.
Jul 28 '08 #2

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

Similar topics

0
by: John | last post by:
Are there any precautions that I should take when downloading a file from a remote file on Linux platform to a local file in Win98 platform? I am using the method ftp_get $remotefile =...
0
by: rstuckart | last post by:
A script successfully connects to a remote server, logs in, reports the size of a file on the server. The problem is that it will not download the file with either ftp_get or ftp_fget. The...
1
by: ralphNOSPAM | last post by:
I'm trying to download a text file named KLAX.TXT at tgftp.nws.noaa.gov using if (ftp_get($conn_id, "Metar Reports/$local_file", $server_file, FTP_BINARY)) { print "Success";
2
by: cyberpunk | last post by:
Hi guys! I have a problem with php function ftp_fget: I try to get file from ftp server and save it to disk, but when i look at downloaded file it is first symbol missing there... what can it be?...
2
by: cxian | last post by:
Hi all, I am trying to download files from a remote with the use of ftp_get. Somehow, the script always return to false. Here's what I got: $conn_id = ftp_connect($ftp_host);...
1
by: irfan.mohammed | last post by:
Dear All, I need your help,i am using ftp_get for getting the file from remote machine.now i am able to save only at one location.i want the user to select the directory any where in the...
13
unicorn
by: unicorn | last post by:
Hi guys, I have moved my site from one domain to another. it worked perfectly on old domain, ftp_put(), ftp_delete() - i.e. FTP upload and remove scripts work fine, but... i have problem using...
2
by: Navpreet Singh | last post by:
Hello Sir The code given below is the vxml code in which i can record my voice but when i want to try to save the recorded file using php script the error occours. The php code is also given below....
2
by: empiresolutions | last post by:
I am using ftp_get to transfer a file from a secure location, to a temp location. (working) Once at the temp location i need to have the file automatically download to the clients local machine....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.