1. include 'showpicture.php'; 這句去掉
2. <td align="padding:5px;">&nbsp;<?php Showing::show('$result[photo]');?></td>
改為<td align="padding:5px;">&nbsp;<img src="showpicture.php?photo=<?php $result[photo]');?>"></td> <!-- 要顯示必須用img標記-->
3.showpicture.php代码改為<?php
class Showing {
    function show($a){
    $filename = $a;    $percent = 0.3;    // Content type    header('Content-Type: image/jpeg');    // Get new dimensions    list($width, $height) = getimagesize($filename);    $new_width = $width * $percent;    $new_height = $height * $percent;    // Resample    $image_p = imagecreatetruecolor($new_width, $new_height);    $image = imagecreatefromjpeg($filename);    imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);    // Output    imagejpeg($image_p, null, 50);
    }
}
$photo = $_GET['photo']; // 獲取photo 參數
Showing::show($photo);
?>