Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Kohana 3。到目前为止,我的可下载文件都驻留在我的应用程序文档根目录中。到目前为止,使用$this->request->send_file($download_file);它工作得很好。
$this->request->send_file($download_file);
但现在我的可下载文件位于另一台服务器上,可以使用 http 访问 http://www.test.com/download/test1.doc。所以 Kohana 的 $this->request->send_file 不再起作用。
谁能告诉我什么是替代解决方案?
您可能希望用于Remote::get在本地下载文件,然后用于Request::send_file下载文件。
Remote::get
Request::send_file
如果服务器是公共的,您可以简单地重定向到有问题的文件。
$this->response->send_file($file);
为我工作..