PHP implements parsing of the source code of the conversion code of Chinese characters. Copy the code as follows :? Phpglobal $ PHP_SELF; echo $ PHP_SELF; $ t1 $ _ POST [textfield1]; $ t2 $ _ POST [textfield2]; $ t3 $ _ POST [textfield3]; $ t4 $ _ POST [textfield4]; Chinese characters
The code is as follows:
Global $ PHP_SELF;
// Echo $ PHP_SELF;
$ T1 = $ _ POST ['textfield1'];
$ T2 = $ _ POST ['textfield2'];
$ T3 = $ _ POST ['textfield3'];
$ T4 = $ _ POST ['textfield4 '];
// Chinese character -- Location Code
If ($ t1! = ""){
$ T2 = sprintf ("% 02d % 02d", ord ($ t1 [0])-160, ord ($ t1 [1])-160 );
// Echo $ t2;
}
// Location Code-Chinese characters
If ($ t3! = ""){
$ T4 = chr (substr ($ t3, 160) + 160). chr (substr ($ t3,) + );
// Echo $ t4;
}
?>
Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
Untitled Document
Align = "center" cellpadding = "0" cellspacing = "0">
Class = "STYLE1"> Chinese character location code query system |
|
The http://www.bkjia.com/PHPjc/321962.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321962.htmlTechArticle code is as follows :? Php global $ PHP_SELF; // echo $ PHP_SELF; $ t1 =$ _ POST ['textfield1']; $ t2 =$ _ POST ['textfield2']; $ t3 = $ _ POST ['textfield3 ']; $ t4 = $ _ POST ['textfield4']; // Chinese characters...