php文件输出
程序员文章站
2022-06-01 12:28:52
...
Header("Content-type: application/octet-stream");Header("Content-Disposition: attachment; filename=log.txt");$filename = '/proj/logs/log.txt';$handle = fopen($filename, "r");$contents = fread($handle, filesize($filename));fclose($handle);echo $contents;die;