Get

Navigation:  Development > Function Reference > Module > Ftp >

Get

Previous pageReturn to chapter overviewNext page

Download a file from remote server.

 

App::Module('Ftp')->get(Remote File,Local File);
 

Return downloaded file size.
 

Parameter

Type

Description

Remote File

Mandatory

Remote file name to download

Local FIle

Mandatory

Local file name to save

 

return true if success

 

See bellow examples:

 
$Ftp->Connect('ftp.example.com');
$Ftp->Login('username','********');
 
// Download file
$size = $Ftp->get(
  'Winter.jpg',
   app::Config()->baseDir("/uploads/Winter.jpg")
);