py = new py(); } /** * 将中文编码成拼音 * @param string $utf8Data utf8字符集数据 * @param string $sRetFormat 返回格式 [head:首字母|all:全拼音] * @return string */ public function encode($utf8Data, $sRetFormat='all'){ if($sRetFormat=='all') { return $this->py->permalink($utf8Data,''); } else { return $this->py->abbr($utf8Data); } } }