2010-06-18 47 views
2

我正在使用Kohana 3.到目前为止,我的可下载文件都驻留在我的应用程序文档根目录中。到目前为止使用$this->request->send_file($download_file);它工作完全正确。Kohana 3从另一台服务器上下载文件

但是现在我的可下载文件在另一台服务器上,可以使用http说http :: //www.test.com/download/test1.doc。所以Kohana的$ this-> request-> send_file不再有效。

有人可以告诉我什么可以替代解决方案吗?

回答

3

您可能会希望使用Remote::get在本地下载文件,然后使用Request::send_file下载文件。

如果服务器是公共的,您可以简单地重定向到有问题的文件。

0
$this->response->send_file($file); 

工作对我来说..

相关问题