pleaseeeeeeeeeeeeeeeHelppppppppppppppppp! 可以用3,按table宽度的%比来设置背景色 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用gd最简单,但生成的图片可能较大。修改起来略嫌麻烦要求不高时建议用table,3张图片“ o-”、“---”、“-> ”文字也可 table --具体函数什么样啊 ? 楼上的,table是表格啊,不是什么函数 其实做直线图用table最简单了,也很美观,看起来跟图片一模一样,只要不包括曲线就可以做出很复杂的图了 <?$i=1;echo"<table border=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=0>";while($i<32){ echo "<td style='border:0px #C0C0C0 solid'>$i</td>";$i++;}function table_entry($s,$e) { $color=$e-$s; if ($s=="") $s=0; if ($s>100) $s=100; if ( $e!=0) { $ret.="<tr><td colspan=31 height=20></td></tr>"; $ret.="<tr><td colspan=$s style='border:0px #C0C0C0 solid' height=2><div align=left>"; $ret.="<table border=0 bgcolor=ffffff height=1 cellspacing=0 cellpadding=0><tr></table>"; $ret.="<td colspan=$color bgcolor=ff0000 height=2><table border=0 bgcolor=0000CC height=2 cellspacing=0 cellpadding=0></table></td></tr>"; } else { $ret="<tr><td width=100% colspan=31 style='border:0px #C0C0C0 solid' height=2><div align=left>"; $ret.="<table border=1 width=100% bgcolor=#FFFFFF height=10 cellspacing=0 cellpadding=0><tr><td></td></tr></table>"; } //$ret.="</div></td></tr></table></td></tr></center></table>"; return $ret;}echo table_entry($s,$e);$s=20;$e=30;echo table_entry($s,$e);$s=10;$e=20;echo table_entry($s,$e);$s=5;$e=25;echo table_entry($s,$e);?>////////////////////////////////////////////////////////////////////////////这是方案3,希望对和我一样的初学者有帮助(不过被头淘汰了) 如何在操作数据库的类中写一个插入记录的成员方法? 关于insert into的问题 php程序导航菜单的链接地址问题 求一份有国家和地区信息的数据库或者xml都行 请问如何分流数据? 免费的ftp.langwan.com 怎么查询时刻? 关于input type='image'的问题 mysql_free_result的用法 用mysql保存网页内容,应该怎样设计比较好? 上传文件请问???? 如何取得地址栏中对变量所附的值??????
要求不高时建议用table,3张图片“ o-”、“---”、“-> ”文字也可
其实做直线图用table最简单了,也很美观,看起来跟图片一模一样,只要不包括曲线就可以做出很复杂的图了
$i=1;
echo"<table border=0 width=100% bgcolor=#FFFFFF cellspacing=0 cellpadding=0>";
while($i<32)
{
echo "<td style='border:0px #C0C0C0 solid'>$i</td>";
$i++;}function table_entry($s,$e)
{
$color=$e-$s;
if ($s=="") $s=0;
if ($s>100) $s=100;
if ( $e!=0)
{
$ret.="<tr><td colspan=31 height=20></td></tr>";
$ret.="<tr><td colspan=$s style='border:0px #C0C0C0 solid' height=2><div align=left>";
$ret.="<table border=0 bgcolor=ffffff height=1 cellspacing=0 cellpadding=0><tr></table>";
$ret.="<td colspan=$color bgcolor=ff0000 height=2><table border=0 bgcolor=0000CC height=2 cellspacing=0 cellpadding=0></table></td></tr>";
}
else
{
$ret="<tr><td width=100% colspan=31 style='border:0px #C0C0C0 solid' height=2><div align=left>";
$ret.="<table border=1 width=100% bgcolor=#FFFFFF height=10 cellspacing=0 cellpadding=0><tr><td></td></tr></table>";
}
//$ret.="</div></td></tr></table></td></tr></center></table>";
return $ret;}echo table_entry($s,$e);
$s=20;
$e=30;
echo table_entry($s,$e);
$s=10;
$e=20;
echo table_entry($s,$e);
$s=5;
$e=25;
echo table_entry($s,$e);?>
////////////////////////////////////////////////////////////////////////////
这是方案3,希望对和我一样的初学者有帮助(不过被头淘汰了)