header("Content-type:image/jpg");
$path ='storage\thumb\path\2020-09-03\我.jpg';
$name = '我.jpg';
$name=rawurlencode($name);//将文件名转化为百分号编码
Header("Content-type: application/octet-stream");
//header("Content-Disposition: attachment; filename=".$name);
header("Content-Disposition: attachment; filename=".$name. ';filename*=utf-8' . $name);
$img = file_get_contents($path);
echo $img;
原理参考:https://blog.robotshell.org/2012/deal-with-http-header-encoding-for-file-download/#comments