怎么根据两点画线? 我要做一个统计表,会用到在一个平面上面根据两个点画一条线,两个店是任意来的?请问可用什么方法实现呢,最好用php+css+js 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JS作图的库http://www.karlson.ru/jsgraphics/html/index.html js的存在很多浏览器兼容的问题,直接用程序画,最直接。<?phpheader("Content-type: image/jpeg");$IM = imagecreate (600,500);$White = imagecolorallocate($IM,0xf5,0xf5,0xf5);$Red = imagecolorallocate($IM,0xff,0x00,0x00);//$LineString=$_GET["LineString"];//$LineString=$_POST["LineString"];$LineString="318,135&327,263.25|148.5,263.25&327,262.5|318.75,137.25&148.5,263.25|139.5,137.25&148.5,262.5|138.75,136.5&318,135.75|";//例子$LineArray=explode("|",$LineString);foreach($LineArray as $LineData){ $LineChild=explode("&",$LineData); if(count($LineChild)==2){ $LineStart=explode(",",$LineChild[0]); $LineEnd=explode(",",$LineChild[1]); imageline($IM,$LineStart[0],$LineStart[1],$LineEnd[0],$LineEnd[1],$Red); }}imagejpeg($IM);//imagejpeg($IM,"test.jpg",80);//保存图片.80为图片质量//推荐用ImagePNG()输出,这样图片质量要好些,文件大小也小些?> 请教,php如何获取远程JSon内容 并post一些参数 linux(centos6.0)如何设置上网呀,thanks 请问smarty有退出循环的函数吗 字段中有字符,sql中排序查找的问题,在线等 php中操作xml,关于encoding.. apache rewrite如何重定向我指定的URL? 哪位帮忙看一下这个文件上传的代码!! 新手问题,请解决!“当前安全设置不允许下载该文件” 简单问题 如何实现简单的发送邮件?具体要求见内容。。。 请教unpack的问题 大型PHP程序的模板引擎和客户端JS问题
http://www.karlson.ru/jsgraphics/html/index.html
header("Content-type: image/jpeg");
$IM = imagecreate (600,500);
$White = imagecolorallocate($IM,0xf5,0xf5,0xf5);
$Red = imagecolorallocate($IM,0xff,0x00,0x00);
//$LineString=$_GET["LineString"];
//$LineString=$_POST["LineString"];
$LineString="318,135&327,263.25|148.5,263.25&327,262.5|318.75,137.25&148.5,263.25|139.5,137.25&148.5,262.5|138.75,136.5&318,135.75|";//例子
$LineArray=explode("|",$LineString);
foreach($LineArray as $LineData){
$LineChild=explode("&",$LineData);
if(count($LineChild)==2){
$LineStart=explode(",",$LineChild[0]);
$LineEnd=explode(",",$LineChild[1]);
imageline($IM,$LineStart[0],$LineStart[1],$LineEnd[0],$LineEnd[1],$Red);
}
}
imagejpeg($IM);
//imagejpeg($IM,"test.jpg",80);//保存图片.80为图片质量
//推荐用ImagePNG()输出,这样图片质量要好些,文件大小也小些
?>