/**
* @param string $file
* @param string $path
* @return bool
*/
function write_on_cloud($file, $path)
{
$conn_id = \ftp_connect(_CLOUD_FTP_HOST_, 21);
$login = \ftp_login($conn_id, _CLOUD_FTP_LOGIN_, _CLOUD_FTP_PASSWORD_);
if($login){
if (ftp_put($conn_id, $path, $file, FTP_ASCII)) {
return true;
} else {
return false;
}
}else{
return false;
}
}