一个汉字转拼音类

浏览:18373 最后更新:2016-01-22 20:17 分类:类库 关键字: 汉字转拼音
直接放在ThinkPHP\Extend\Library\ORG\Util里就可以了
然后引入import("ORG.Util.Pinyin");
$py = new PinYin();
echo $py->getAllPY("输出汉字所有拼音"); //shuchuhanzisuoyoupinyin
echo $py->getFirstPY("输出汉字首拼音"); //schzspy
还有一个API,不过怕某天不能用了,,大家可以去研究下http://huoqu.sinaapp.com/pinyin/utf8.html
评论( 相关
后面还有条评论,点击查看>>