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
- function DescargarArchivos($Local, $Remoto)
- {
- $cid = ftp_connect("192.168.1.84");
- $resultado = ftp_login($cid, "anonymous", "");
- ftp_chdir($cid, "mauricio");
- $Descarga = ftp_get($cid, $Local, $Remoto, FTP_BINARY);
- if($Descarga)
- {
- echo "download ssuccesfull";
- }
- else
- {
- echo "download not succesfull";
- }
- }