2

我正在使用 Kohana 3。到目前为止,我的可下载文件都驻留在我的应用程序文档根目录中。到目前为止,使用$this->request->send_file($download_file);它工作得很好。

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

谁能告诉我什么是替代解决方案?

4

2 回答 2

3

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

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

于 2010-06-28T14:42:16.500 回答
0
 $this->response->send_file($file);

为我工作..

于 2011-10-12T07:35:32.707 回答