php 将汉字转换成拼音的方法封装成工具包,代码如下: <?php class PinyinTool { private static $pylist = array( 'a'=>-20319,'ai'=>-20317,'...