function picViews(){
$options=[
'parent_code'=>'02BAA01',
'page'=>1];
$parent_code=$options['parent_code'];
$page=$options['page'];
$picurl='D:\dossr\02BAA01 (1).jpg';
header('content-type:application/image/jpeg');
header('Content-Disposition: inline; filename="02BAA01 (1).jpg"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
@readfile($picurl);
//或用以下两句也行
$picecho=file_get_contents($picurl);
echo $picecho;
exit();
}
前端需要加载图片的地方直接引用picViews即可。