作者 lyh

gx

... ... @@ -131,15 +131,11 @@ class ImageController extends Controller
*/
public function readImageContent($info,$w,$h)
{
$path = $this->config['root'] . $info['path'];
if (!is_file($path)) {
$this->response('指定图片已被系统删除!', Code::USER_ERROR);
}
if ($w > 0 && $h > 0) {
$path = $this->cacheImage($info, $w, $h);
$content = file_get_contents($path);
} else {
$content = file_get_contents($path);
$content = file_get_contents($info['path']);
}
return $content;
}
... ...