I have this fragment:
if(!$wp_filesystem->put_contents( $file_path, $file_content, FS_CHMOD_FILE )) {
echo 'error during creating the file';
}
This code works properly, but instead of saving the file on the server I would like to display browser dialog box to save the file with this content on local disk.
Thanks in advance for any help.