为什么只能显示一张图片呢?

为什么只能显示一张图片呢?

我写了个缩略图的函数,然后调用,可为什么调用了两次却输出了一张图片呢?
缩略图函数:

[复制到剪切板]
CODE:
<?php
class myfunction{
function 
thumb($filename,$dst_width,$dst_height){
header("Content-type:image/jpeg");
list(
$src_width,$src_height)=getimagesize($filename);
if(
$src_width<$dst_width){
$dst_width=$src_width;
}
if(
$src_height<$dst_height){
$dst_height=$src_height;
}
$thumb=imagecreatetruecolor($dst_width,$dst_height);
$source=imagecreatefromjpeg($filename);
imagecopyresized($thumb,$source,0,0,0,0,$dst_width,$dst_height,$src_width,$src_height);
imagejpeg($thumb);
}
}
?> ;


调用该函数的叶子:

[复制到剪切板]
CODE:
<?php
include "image_fn.php";
$tmp=new myfunction;
$tmp->thumb("a.jpg",200,200);
$tmp->thumb("b.jpg",200,200);
?> ;


调用了两次,却只输出 a.jpg这张图片,为什么?

还是没有想出怎么解决~