1234567891011121314151617181920212223 |
- <?php
- namespace app\mobile\controller;
- use app\mobile\MobileBaseController;
- class Download extends MobileBaseController
- {
- public function index()
- {
- return view();
- }
- public function down()
- {
- $file_url = input('file_url', '');
- $file_path = public_path('static/mobile/download').$file_url;
- if (!file_exists($file_path)) {
- jump('文件不存在或已过期!');
- }
- return download($file_path,$file_url);
- }
- }
|