请问怎么样画一条横线和一条竖线?在线等. bool imageline ( resource image, int x1, int y1, int x2, int y2, int color )imageline() 用 color 颜色在图像 image 中从坐标 x1,y1 到 x2,y2(图像左上角为 0, 0)画一条线段。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php$img = imagecreatetruecolor(200, 200);$white = imagecolorallocate($img, 255, 255, 255);$black = imagecolorallocate($img, 0, 0, 0);//横线imageline($img, 10, 50, 100, 50, $white);//竖线imageline($img, 10, 80, 10, 180, $white);header("Content-type: image/png");imagepng($img);imagedestroy($img);?> 主要是看x1 x2 y1 y2 嘿嘿,你是要在html页面上加线吧,上面的方法输出的是一个图片,自然不能加按钮了.加横线可以用<hr>竖线....用div或table或其它结合css的border即可,横线也可以这样. 求解php的登录验证问题 eval问题,求助! smarty 局部缓存造成的问题 关于paypal的问题,请教各位 求php java 的稳定方法.谢 请问怎样用php的mail函数发送html邮件,在线等! 【求助】关于is_uploaded_file()的使用 用PHP连接Access出现的错误怎么解决??? php 与 sql server2000 请问如果要在Win2000下安装GD库除了修改php.ini文件之外还有什么要做? 求如何获取系统时间函数 使用构建的SQL类库,如果我是两个数据库怎么办?
$img = imagecreatetruecolor(200, 200);
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 0, 0);
//横线
imageline($img, 10, 50, 100, 50, $white);
//竖线
imageline($img, 10, 80, 10, 180, $white);
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?> 主要是看x1 x2 y1 y2
竖线....用div或table或其它结合css的border即可,横线也可以这样.