mPut

Navigation:  Development > Function Reference > Module > Ftp >

mPut

Previous pageReturn to chapter overviewNext page

Upload a folder with contain.

 

App::Module('Ftp')->mPut(Local Directory,Remote Directory,[Continuous]);
 

Return downloaded file size.
 

Parameter

Type

Description

Local Directory

Mandatory

Local file name to download

Remote File

Mandatory

Remote file name to download

Continous

Optional

Reconnect if connection break.(true,false)

 

return true if success

 

See bellow examples:

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