www.796796.com 是不是这种功能啊,如果是的话,有需要可以联系我,QQ 10196648

解决方案 »

  1.   

    <?php
    function gb2big5($str) {
    $filepath='utilities/gb-big5.table';
    $gb2big5_table=fread(fopen($filepath, 'r'), filesize($filepath));
    $max=strlen($str)-1;
    for($i=0;$i<$max;$i++) {
    $h=ord($str[$i]);
    if($h>=160) {
    $l=ord($str[$i+1]);
    $gb=($h==161 && $l==64) ? " " : substr($gb2big5_table, ($h-160)*510+($l-1)*2, 2);
    $str[$i]=$gb[0];
    $str[$i+1]=$gb[1];
    $i++;
    }
    }
    return $str;
    }// 通过$_SESSION or $_GET来获得$charsetif($_GET[charset]=='big5'){
    header('Content-Type: text/html; charset=big5');
    ob_start('gb2big5');
    }echo '测试数据!';?>
      

  2.   

    http://www.ugain.org/utilities/gb-big5.table