Ϊҳ - ղ ASPվAspzz.Cn- Ƽվ顢Ƽ㡢5G,վ
ѣ ҵ ֻ
ǰλã ҳ > վѧԺ > PHP̳ >

PHPȡֱʻܡԿá

ʱ䣺2021-03-06 03:19 Ŀ121 Դ
ƪ½ڽPHPȡֱʻܡҹҲο£ пôPHPõֵıʻķʽʵ֣ô˼ˡ tone=$tone; } function setFormat($head,$format,$foot) { $this->head=$head; $this->f

ƪ½ڽPHPȡֱʻܡҹҲο£

пôPHPõֵıʻķʽʵ֣ô˼ˡ

tone=$tone; } function setFormat($head,$format,$foot) { $this->head=$head; $this->format=$format; $this->foot=$foot; } function find($str,$isFirst=true) { for ($i=0;$i<36;$i++) { for ($j=0;$j<5;$j++) { $index=strstr($this->data[$i][$j],$str); if (!($index===false)&&($index%2==0)) return ($i+1);//($i+1).($isFirst?$this->dataIndex[$j]:"") } } return " "; } function render($str,$ascii=false) { if ($ascii) return str_replace("%1",$str,str_replace("%2",$this->format)); $bihua=strstr($this->dataSpecial,$str." ")?$str:$this->find($str." ",$this->tone); return str_replace("%1",$bihua,$this->format)); } function parse($str) { $output=""; $length=strlen($str); $output.=$this->head; for ($i=0;$i<$length;++$i) { if ($i==$length-1) { $output.=$this->render($str[$i],true); break; } $code1=ord($str[$i]); $code2=ord($str[$i+1]); if ($code1==0x0D&&$code2==0x0A) { $output.=$this->foot; $output.=$this->head; ++$i; } else if ($code1>=0x81&&$code1<=0xFE&&$code2>=0x40&&$code2<=0xFE&&$code2!=0x7F) { $output.=$this->render($str[$i].$str[$i+1]); ++$i; } else $output.=$this->render($str[$i],true); } $output.=$this->foot; return $output; } function bihua() { $this->tone=true; $this->head=""; $this->format=""; $this->foot=" %2 %1 "; $this->dataIndex=array("һ","ح","د","ؼ","^"); $this->dataSpecial=" ' @ A B C D E F G H I J K L M N O P Q R S T U V W Y Z \ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ? ? ? ? ? ? ? ? ? ? ? ? ? "; $this->data[0][0]="һ "; $this->data[0][4]=" "; $this->data[1][0]=" ʮ "; $this->data[1][1]=" "; $this->data[1][2]=" V ذ "; $this->data[1][4]=" ؿ "; $this->data[2][0]=" ء ʿ أ ߮ "; $this->data[2][1]=" С ɽ "; $this->data[2][2]="ǧ ô Ϧ "; $this->data[2][3]=" Ѿ ֮ "; $this->data[2][4]="ʬ Ҳ Ů ϰ "; $this->data[3][0]=" Ԫ Τ ר ؤ إ ľ ֧ ئ ̫ Ȯ ƥ "; $this->data[3][1]="ֹ Ի ˮ "; $this->data[3][2]=" ţ ë ز ʲ Ƭ צ س Ƿ "; $this->data[3][3]=" Ϊ "; $this->data[3][4]=" Ȱ ˫ "; $this->data[4][0]=" ĩ δ ʾ ȥ ܴ ܵ ا ʯ ƽ F ۽ "; $this->data[4][1]=" ռ ͹ ¬ ҵ ˧ Ŀ Ҷ ߲ ֻ ʷ ߳ ߴ ߵ ߷ ߶ ̾ Ƚ "; $this->data[4][2]=" ʧ ʸ է Ǫ ش ˦ ӡ ص î ۻ "; $this->data[4][3]=" ͡ ֭ ͷ Ѩ ڦ ڧ д ڨ ѵ Ѷ "; $this->data[4][4]="˾ ū Ƥ ʥ ̨ ì Ԧ ĸ ˿ "; $this->data[5][0]=" ʽ Ǥ ִ ɨ ܶ ܷ ܸ ܹ â ֥ ܺ ܻ ܼ Ȩ ب Э ѹ ҳ а Ң "; $this->data[5][1]=" ʦ ҷ ͬ ߺ "; $this->data[5][2]=" ͢ Ǩ ΰ ƹ α Ѫ ض f ȫ ɱ ү ɡ Σ Ѯ ּ ɫ "; $this->data[5][3]=" ׳ ױ ׯ ϫ Ѵ æ լ ک ڪ ګ ũ "; $this->data[5][4]=" Ѱ Ѹ ة Ϸ IJ ѱ Լ Ѳ "; $this->data[6][0]=" \ Ū _ ` Զ Υ ̳ g ַ ץ W Т ̮ Ͷ \ ־ Ť ȴ ܽ ܾ έ ܿ ѿ d « о ɼ x ϻ ҽ ߯ a "; $this->data[6][1]=" ± Ф ʱ ߻ ߽ ֨ ߾ Ż ԰ ߿ Χ ѽ D Ա Ǻ ˱ "; $this->data[6][2]=" ĵ ͺ ˽ ÿ Ӷ ١ ס λ ٢ ٤ ϣ ۡ ۼ ۾ ɾ ͮ ӭ ϵ "; $this->data[6][3]=" ״ Ķ Ӧ ® ұ Ǽ V ̭ Ž a b ɳ I h û ֤ ڬ ڭ l ʶ թ ڮ ڰ گ ם ڱ "; $this->data[6][4]=" ƨ β ½ ¤ ׹ Ŭ ۿ ۢ γ ɴ ֽ ¿ Ŧ "; $this->data[7][0]=" e õ d h i ߰ Ĩ ߞ £ ƺ ̹ Ѻ ӵ š ׾ ̧ Ĵ Ү ȡ ï ƻ ɻ Ӣ Է Ƌ ֱ ƅ ̦ é ֦ ö ǹ ɥ L ̬ ŷ Ź ¢ ۣ ת ն ۤ "; $this->data[7][1]=" Щ ׿ ² ζ F P զ ӽ M ͼ "; $this->data[7][2]=" ǥ ۥ ֪ ί ٥ ٦ ʹ ٧ ٨ ֶ ٩ ٪ ƾ ٬ ٫ ٭ ٮ ٯ ٰ C ۦ ɲ ۧ ̰ ƶ ֫ в ۨ A "; $this->data[7][3]=" ҹ ű ä å բ ֣ ȯ ¯ Ȳ ĭ dz й մ t ע Ţ к Ӿ ѧ ʵ ڲ ڳ ڴ ʫ ڵ ڶ ۩ t ڷ ڸ ڹ ѯ ں ڻ ڼ "; $this->data[7][4]=" ¼ ˢ \ ª İ ؽ ʼ ķ ʭ ϸ ʻ ֯ פ "; $this->data[8][0]=" ɺ ԫ ̢ Ю ק ͦ ˩ ʰ ָ ƴ Ų ij Q ã ӫ ݡ ݢ ݣ ݥ ݤ ݦ ҩ ջ դ N r Ҫ ۪ ש ɰ ˣ ǣ Ÿ ѻ "; $this->data[8][1]=" ս Ű ʡ ۫ g գ o ð ӳ خ η ſ θ Ϻ ˼ Ʒ ѫ ҧ Ӵ ̿ Ͽ i ֡ j "; $this->data[8][2]=" Կ ť ж ձ ۬ ѡ ٱ ٲ ٴ ٳ ˳ ٶ ٵ ٷ Ȫ ׷ ٸ ٹ m ۭ s ۮ ʳ ʤ ̥ ʨ s ӈ ó Թ ʴ ط "; $this->data[8][3]=" ͤ ͥ S M f ʩ ] h ¦ ǰ ը ˸ ϴ Ǣ Ⱦ Ũ ǡ k ͻ Є ף ڽ ھ ڿ ˵ "; $this->data[8][4]=" ʺ ѷ ü Ժ Ҧ ŭ ӯ Ѥ ͳ "; $this->data[9][0]=" ̩ E b յ ׽ Ԭ ֿ ͱ ݨ Ə ݩ ç ݪ Ī ݫ ݭ ݬ ݮ ݯ ݰ ݱ ݲ ݳ ݴ ݵ ݶ ݷ ɯ ݸ Ө ݹ ݺ q ݻ ͩ ˨ Φ ׮ У ت ث n ԭ ѳ b "; $this->data[9][1]="| ɹ ѣ y Ѽ ^ Ŷ Բ ¸ "; $this->data[9][2]=" Ǯ ǯ Ǧ í ȱ B ͸ Ц ٺ ٻ ծ l ټ ֵ ٽ m پ ٿ Ϣ ۯ ͽ ; Ҩ _ ֬ ŧ ԧ "; $this->data[9][3]=" ڡ ˥ ϯ ׼ ֢ ի Ӹ ƣ Ч վ ƿ ȭ ˷ @ ۰ Ϳ ԡ ɬ ӿ խ ŵ ڣ Р ̻ А B ڤ ˭ ԩ ׻ ̸ "; $this->data[9][4]=" չ м D A ˡ e ͨ Ԥ ɣ U V A "; $this->data[10][0]=" Q L ° ܡ ܢ Ҵ ̽ ܤ ܣ ְ Ȣ ݼ ݽ ݾ ݿ ή Dž I Ƽ ө Ӫ Ǭ е ÷ Ͱ ۱ Ʊ ۲ ̪ ˶ ~ ˬ Ϯ ʢ ѩ ǵ "; $this->data[10][1]=" ­ ȸ Ұ ž ֺ Ծ Ψ ơ ɶ Х ո Ӥ Ȧ "; $this->data[10][2]=" ͭ ա ϳ ҿ ż ͵ ͣ ƫ a b б E Ϥ Ï è S ظ "; $this->data[10][3]=" Ȭ ӹ ¹ ^ ճ ϩ R a B Ԩ Һ ϧ Ω Ҥ ı г T ν "; $this->data[10][4]=" ξ d ¡ O G ά ׺ "; $this->data[11][0]=" e g a ܦ E ܧ Խ Ҿ h ϲ ܨ ܩ Ԯ G § Ҽ ɦ ˹ } ɢ ļ u c C ȋ Ҭ ֲ ɭ ׵ c N Ӳ ȷ ֳ c "; $this->data[11][1]=" ι Ƕ ñ P "; $this->data[11][2]=" п ̺ F ʣ ϡ ˰ ɸ Y Ͳ ѭ ͧ ߱ ˴ Ƣ Ҹ ǻ K ³ Ȼ "; $this->data[11][3]=" װ C Ʀ ʹ o ͯ j տ ʪ μ Ԣ ԣ ȹ » л ҥ ǫ "; $this->data[11][4]=" Ϭ ǿ ϶ ý ɩ ƭ Y ɧ Ե "; $this->data[12][0]=" ɪ r u ܪ ܫ ۳ W Я f ҡ s ̯ Ƹ ۴ ѥ ȵ Ĺ Ļ X q Ш J ¥ ͪ µ d "; $this->data[12][1]=" Ƶ ˯ ů Ъ Ͼ Q ڝ · Dz ͛ Ӽ ɤ "; $this->data[12][2]=" ê ׶ @ o ǩ ɵ J ΢ ң ղ Գ ӱ e t ɷ @ "; $this->data[12][3]=" ̵ } { ۵ Ӻ ` ú Į Դ Ϫ ̲ V į @ á "; $this->data[12][4]="Ⱥ ϱ "; $this->data[13][0]=" H ׸ { ǽ Ʋ ܬ ܭ ժ ˤ Y ߡ Ǿ Ľ ĺ ġ ޡ ޢ ޣ ε ޤ ģ ե ȶ k ø \ ̼ Ը g ԯ Ͻ շ "; $this->data[13][1]=" ӻ Ӭ ֩ R N ׬ "; $this->data[13][2]=" þ C Ѭ ع ɮ q غ ۶ ò Ĥ v "; $this->data[13][3]=" M ۷ Ǹ Ϩ ɿ Ư © Ϋ կ ̷ "; $this->data[13][4]=" ؾ ӧ "; $this->data[14][0]=" G ] ߢ ˺ Ȥ ߣ ] ײ ߤ ߥ ܯ ׫ Ь ޥ ަ ާ ި ީ ު ޫ ެ ޭ ʕ ӣ k Ʈ ù "; $this->data[14][1]=" Ϲ ҭ ˻ J Ӱ ̤ Ы e ī "; $this->data[14][2]=" D E ¨ ƪ ׭ Ƨ l ϥ m "; $this->data[14][3]=" Ħ n ̱ n DZ ̶ P Ǵ "; $this->data[14][4]=" ο ¾ ԥ "; $this->data[15][0]=" Z [ U ߦ ߧ ۸ ޮ V ޯ ް Ѧ ޱ н ޲ ޳ ޴ ج ޵ ޶ H ư ȩ v "; $this->data[15][1]=" Ƴ ۂ y Μ Ĭ ǭ "; $this->data[15][2]=" G H ] r V Ο v B ̡ "; $this->data[15][3]=" ĥ S ȳ Ƴ ȼ º и O "; $this->data[15][4]=" G "; $this->data[16][0]=" b ߩ ߪ ޷ B ޸ ޹ ޺ ޻ ϭ ̴ ˪ ϼ "; $this->data[16][1]="ȣ t ˲ ͫ ̣ ۉ ۈ Y "; $this->data[16][2]=" κ m ӷ "; $this->data[16][3]=" Ӯ ų [ "; $this->data[16][4]=" "; $this->data[17][0]=" k ź H G ޼ ˊ s "; $this->data[17][1]=" հ ۗ ۑ q "; $this->data[17][2]=" Ğ "; $this->data[17][3]="ӥ e d "; $this->data[17][4]=" "; $this->data[18][0]=" ߫ ޽ ޾ ޿ Ģ ´ ۹ "; $this->data[18][1]=" G H ώ "; $this->data[18][2]=" J ػ з "; $this->data[18][3]=" Ѣ "; $this->data[18][4]=" "; $this->data[19][0]=" ܰ Z "; $this->data[19][1]="ۺ ҫ Ρ f "; $this->data[19][2]=" J H "; $this->data[19][3]="ħ Ŵ "; $this->data[19][4]="Ʃ "; $this->data[20][0]="i ܱ c ¶ "; $this->data[20][1]=" "; $this->data[20][2]=" "; $this->data[20][3]=" "; $this->data[20][4]=" "; $this->data[21][0]="j ܲ ] պ f "; $this->data[21][1]=" "; $this->data[21][2]="K A "; $this->data[21][3]="ȿ "; $this->data[21][4]=" "; $this->data[22][0]=" ߬ ȧ "; $this->data[22][1]=" "; $this->data[22][2]=" "; $this->data[22][3]=" "; $this->data[23][0]=" "; $this->data[23][1]=" "; $this->data[23][2]=" "; $this->data[23][3]=" "; $this->data[24][0]=" ߭ "; $this->data[24][1]=" "; $this->data[24][2]=" "; $this->data[24][3]=" "; $this->data[25][1]=" "; $this->data[29][2]=" "; $this->data[35][2]="Q "; } } $text = new bihua(); echo $text->find("л"); ?>

н12

PSΪƼ߹߹Ҳοʹã

߳úֱ˳/ʻ///ѯߣ

ߺʱ/ƴ/ײѯߣ

ĺƴתߣ

ߺתƴߣ

PHPݸȤĶ߿ɲ鿴վר⣺

ϣԴPHP

༭ASPվ

    Ƽ
      ȵĶ