请问我想加入一个phpthumb的类替换系统的 缩略图 我弄了5个小时了 也没弄明白 帮帮我被  
require_once '../ThumbLib.inc.php';
$thumb = PhpThumbFactory::create('1.jpg');
$thumb->resize(240);
$thumb->show();
这个是 官方给的实例 我只想把它加入到织梦中
if ( ! function_exists('thumb'))
{
function thumb($imgurl, $width, $height, $bg = true)
{
global $cfg_mainsite,$cfg_multi_site;
$thumb = eregi("http://",$imgurl)?str_replace($cfg_mainsite,'',$imgurl):$imgurl;
list($thumbname,$extname) = explode('.',$thumb);
$newthumb = $thumbname.'_'.$width.'_'.$height.'.'.$extname;
if(!$thumbname || !$extname || !file_exists(DEDEROOT.$thumb)) return $imgurl;
if(!file_exists(DEDEROOT.$newthumb))
{
include_once DEDEINC.'/image.func.php';
if($bg==true)
{
ImageResizeNew(DEDEROOT.$thumb, $width, $height, DEDEROOT.$newthumb);
}
else
{
ImageResize(DEDEROOT.$thumb, $width, $height, DEDEROOT.$newthumb);
}
}
return $cfg_multi_site=='Y'?$cfg_mainsite.$newthumb:$newthumb;
}
}调用方法:
标签 : [field:picname function='thumb(@me,$width,$height,$bg)'/]这里面是一个可以调用缩略图的代码 请问怎么样能替换让这个类起作用呢!?