/**
* 文件下载
*/
public function download()
{
$url = input('get.url/s', '');
ob_start();
$title = substr($url, strrpos($url, '/') + 1);
$size = readfile($url);
Header( "Content-type:application/octet-stream");
Header( "Accept-Ranges:bytes");
Header( "Accept-Length:");
header( "Content-Disposition: attachment; filename= $title");
exit;
}
}
url | http://qiniu.qmwpt.com/shopping/static/uploads/file/20200812/202008121907547979.docx |
USER | www |
HOME | /home/www |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.qimy.net |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | qimy.net |
SERVER_PORT | 443 |
SERVER_ADDR | 211.149.131.93 |
REMOTE_PORT | 57522 |
REMOTE_ADDR | 44.203.58.132 |
SERVER_SOFTWARE | nginx/1.21.4 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/qimy.net/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /index/system/download.html?url=http://qiniu.qmwpt.com/shopping/static/uploads/file/20200812/202008121907547979.docx |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//index/system/download.html&url=http://qiniu.qmwpt.com/shopping/static/uploads/file/20200812/202008121907547979.docx |
SCRIPT_FILENAME | /www/wwwroot/qimy.net/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711628213.51 |
REQUEST_TIME | 1711628213 |