日期:2013-05-09  浏览次数:20436 次

<?
/***********************************************************************
                       Written by caocao
                       caocao@eastday.com
                       http://nethermit.yeah.net
                       
                       繁体中文转换为简体中文类
                       使用方法:
                       $convert=new btog;
                       $str=$convert->big5togb($str);

                       With the help of Keyes
                       Keyes2000@263.net
                       http://my-wjl.scu.edu.cn/~Keyes
***********************************************************************/
class btog
{
var 
$big5order;

function 
isbig5($code)
{
  if (
strlen($code)>=2)
  {
    
$code=strtok($code,"");

    if (
ord($code[0]) < 161)
    {
      return (
0);
    }
    else
    {
      if (((
ord($code[1<