- function displayimg($image)
- {
- $image = './upload/'.imgdecode($image);
- //echo $image;exit;
- if (file_exists($image))
- {
- $info = getimagesize($image);
- header("Content-type:$info[mime]");
- switch ($info[2])
- {
- case 1: $cimage = imagecreatefromgif($image);
- imagegif($cimage);
- imagedestroy($cimage);
- break;
- case 2: $cimage = imagecreatefromjpeg($image);
- imagejpeg($cimage);
- imagedestroy($cimage);
- break;
- case 3: $cimage = imagecreatefrompng($image);
- imagepng($cimage);
- imagedestroy($cimage);
- break;
- case 6: $cimage = imagecreatefromwbmp($image);
- imagewbmp($cimage);
- imagedestroy($cimage);
- break;
- }
- echo $simage;
- }
- else
- {//开源代码Vevb.com
- header("HTTP/1.0 404 Not Found");
- }
- }
新闻热点
疑难解答