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,希望对和我一样的初学者有帮助(不过被头淘汰了) 字符串偏移量未设置。 应用开源代码phpword如何解决word合并单元格的问题 PHP2.2+MySQL5.5+Apache2.2的配置 php能不能实现禁止上网功能 谁能帮我看看写的对不对,我刚学PHP 求助有关update的问题!!! php页面跳转问题 找php人员长期合作 发现PHP的一个问题,不知道解决方法怎样. php 请问大家 怎么能获取报错页面 上传文件请问???? 如何取得地址栏中对变量所附的值??????
要求不高时建议用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,希望对和我一样的初学者有帮助(不过被头淘汰了)