其实这个程序是去年写的 但是当时大意了,只有一份代码放在免费空间上 结果免费空间突然挂了,我的代码也就没了 今天重写了一下 原理:原理很简单,就是根据汉字的区位码来从字模文件里读取汉字的点阵数据 在做替换输出; 代码如下 p.php <?phpfunction bighz($a){//函数作用:从hzk16文件里取指定的单个汉字的字模数据,并返回处理好的数据//P0wered by 创亿无限//http://chuangyi.programfan.com//qq:605271029$rtn="";$a1=ord(substr($a,0,1))-161;$a2=ord(substr($a,1,1))-161;$p=($a1*94+$a2)*32;$fp=fopen("HZK16","r");fseek($fp,$p);$pic=fread($fp,32);for($i=0;$i<16;$i++){ $str1=decbin(ord(substr($pic,$i*2,1))); $str2=decbin(ord(substr($pic,$i*2+1,1))); $str1=str_pad($str1,8,"0",STR_PAD_LEFT); $str2=str_pad($str2,8,"0",STR_PAD_LEFT); $str1=str_replace("1",$a,$str1); $str1=str_replace("0","__",$str1); $str2=str_replace("1",$a,$str2); $str2=str_replace("0","__",$str2); $rtn.=$str1; $rtn.=$str2; $rtn.="<br>"; } return $rtn;}$char=$_GET["c"]; //不要有字母和数字for($i=0;$i<strlen($char);$i+=2){echo bighz(substr($char,$i,2));} ?> 需要说明的是 这个程序需要有HZK16这个字模文件 需要的可以去http://www.jiangyunfan.cn/my/bighz/code.rar下载 大家还可以继续完善功能

评论