diudiu进!
http://mall.xicn.net 这样一个系统要多少钱?说个价?俺想要!
- 娱乐乐园,
作者 yimu 发布于 0000-00-00 分类:php基础编程
我用php自己画了指示条,生成png格式图片,在网页中看不到进度,而在dreamwaver下可以看到,???
逛论坛交流:图片显示[求助]
>IE不支持PNG
>支持
>源码贴出来:
function ShowSpaceCollate($total,$surplus,$lenth,$height)
{
Header("Content-type: image/PNG");
$pivotx=intval($lenth/2);
$pivoty=floor($height/2);
$barinilen=$total-$surplus;
$degree=number_format($barinilen/$total,1);
$barlen=round($barinilen/$total*$lenth);
$im = imagecreate($lenth,$height);
//定义图片中用到的颜色颜色
$black=imagecolorallocate($im, 0,0,0);
$white=imagecolorallocate($im, 255,255,255);
$gray=imagecolorallocate($im, 200,200,200);
$border=imagecolorallocate($im, 255,0,0);
$bar=imagecolorallocate($im,50,0,75);
imagefilledrectangle($im,0,0,$lenth,$height,$gray);
imagefilledrectangle($im,0,0,$barlen,$height,$bar);
$radius=intval($height/2)-4;
imagearc($im,$lenth-$radius,$pivoty,$radius*2,$radius*2,270,450,$border);
imagearc($im,$radius,$pivoty,$radius*2,$radius*2,90,270,$border);
imageline($im,$radius,3,$lenth-$radius,3,$border);
imageline($im,$radius,$height-4,$lenth-$radius,$height-4,$border);
imagefilltoborder($im,0,0,$border,$white);
imagefilltoborder($im,0,$height,$border,$white);
imagecolortransparent($im,$white);
ImagePNG($im,"spacecollate.png");
ImageDestroy($im);
}
…………………………
ShowSpaceCollate($temrec,$surpspace,500,16);
……………………
![]()
>tmyu 附带了这个的图片:
>你下载一看就知道了
5 条回复
回复