处理无图像的图像
This commit is contained in:
parent
194b8d3a5e
commit
1375ec7643
|
@ -89,11 +89,19 @@ class ServiceController extends Zend_Controller_Action
|
|||
exit;
|
||||
} else {
|
||||
$url=$this->config->bigthumb->path.sprintf('%05d',floor(($thumb['gid']+0.1)/100)*100).'-'.sprintf('%05d',ceil(($thumb['gid']+0.1)/100)*100-1)."/".$thumb['gid'];
|
||||
$url.='/public/'.str_replace('_s.','.',$thumb['filename']);
|
||||
header("Content-Type:image/".$thumb['filetype']);
|
||||
$file=fopen($url,'r');
|
||||
fpassthru($file);
|
||||
exit;
|
||||
$url.='/public/'.str_replace('_s.','.',$thumb['filename']);
|
||||
if (file_exists($url)) {
|
||||
header("Content-Type:image/".$thumb['filetype']);
|
||||
$file=fopen($url,'r');
|
||||
fpassthru($file);
|
||||
exit;
|
||||
} else {
|
||||
header("Content-Type:image/png");
|
||||
header("Content-Length: " . filesize("images/nothumb.png"));
|
||||
$file=fopen("images/nothumb.png",'r');
|
||||
fpassthru($file);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue