在CakePHP 2.1中强制下载文件 [英] Force download file in CakePHP 2.1

查看:91
本文介绍了在CakePHP 2.1中强制下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用强制下载组件来下载文件。

I am using force download component to get download the file.

一旦用户接受保存,我想在同一页面上显示成功Flash消息,否则希望在该页面上显示错误消息。

I want to show success flash message on the same page once the user accept it to save otherwise want to show an error message on that page.

第一件事,是否可以跟踪保存对话框事件(是否确认),如果可以的话我该如何实现?

First thing, Is it possible to track the save dialog event (not confirmed if it is) and if it is then how I can achieve it?

推荐答案

在新标签中打开它,并使用您的强制下载组件。

Open it in a new tab and use your force download component.

这篇关于在CakePHP 2.1中强制下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆