This article mainly introduces the PHP full angle conversion function, the current can find all the corners are listed to replace it, the need for friends can refer to the following
Previously tried to find the Internet through the ASCII characters such as substitution, found a lot of inexplicable problems. Finally replaced by the following character replacement, the current can be found in all the corners are listed to replace the bar code as follows:/** * Full-angle conversion to half-width * * @param string $str * @return string */ public Function Sbc2dbc ($str) { $arr = array ( ' 0 ' => ' 0 ', ' 1 ' =&G t; ' 1 ', ' 2 ' => ' 2 ', ' 3 ' => ' 3 ', ' 4 ' => ' 4 ', ' 5 ' => ' 5 ', ' 6 ' => ' 6 ', ' 7 ' => ' 7 ', ' 8 ' => ' 8 ', ' 9 ' => ' 9 ', ' a ' = > ' A ', ' B ' => ' B ', ' C ' => ' C ', ' d ' => ' d ', ' e ' => ' e ', ' F ' => ' f ', ' G ' => ' g ', ' H ' => ' h ', ' I ' => ' I ', ' j ' = > ' J ', ' K ' => ' K ', ' l ' => ' l ', ' m ' => ' m ', ' n ' => ' n ', ' o ' => ' o ', ' P ' => ' P ', ' Q ' => ' Q ', ' R ' => ' R ', ' s ' => ', ' t ' => ' t ', ' u ' => ' u ', ' V ' => ' V ', ' W ' => ' W ', ' x ' => ' x ', ' y ' => ' y ', ' z ' => ' z ', ' a ' => ' A ', ' B ' => ' B ', ' C ' => ' C ', ' d ' => ' d ', ' e ' => ' e ', ' F ' => ' f ', ' G ' => ' g ', ' H ' => ' h ', ' I ', => ' I ', ' j ' = > ' J ', ' K ' => ' K ', ' l ' => ' l ', ' m ' => ' m ', ' n ' => ' n ', ' o ' => ' o ', ' P ' => ' P ', ' Q ' => ' Q ', ' R ' => ' R ', ' s ' => ' s ', ' t ' =>' T ', ' u ' => ' u ', ' V ' => ' V ', ' W ' => ' W ', ' x ' => ' x ', ' y ' => ' y ', ' z ' => ' z ', ' (' => ' (', ') ' => ') ' , ' (' => ' (', ') ' => ') ', ' ' => ' [', ' ', ' ' => '] ', ' => ' [', ' ' => '] ', ' ' ' => ' ', ' ' ' => ' ' ', ' ' > ', ', ' ' => ', ' {' => ' {', '} ' => '} ', ' => ' < ', ' ' => ' > ', '% ' => '% ', ' + ' => ' + ', '-' => '-', '-' => '-', ' ~ ' => ', ': ' => ': ', '. ' => ', ', ', ' => ', ', ', ' => ', ', ', ' => ', ', ', ' => '; ' => '? ', '! ' => '! ', ' ... ' => '-', ' ‖ ' => ' | ', ' ' => ', ', ' ' => ', ' ', ' ' => ', ' ' | ' => ' | ', ' ' => ' ', ' ' => ', ' ' x ' => ' *, '  ̄ ' => ', '. ' => '. ', ' * ' => ' * ', ' & ' => ' & ', ' => ' < ', ' > ' => ' > ', ' $ ' => ' $ ', ' @ ' => ' @ ', ' ^ ' => ' ^ ', ' _ ' => ' _ ', ' ' => ' ', ' ' ¥ ' => ' $ ', ' = ' => ' = ', ' ' => ', ', '/' => '/' '; return Strtr ($STR, $ ARR); }