ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
文字转拼音 $content="神经病啊"; $pinyin = new \Overtrue\Pinyin\Pinyin('Overtrue\Pinyin\MemoryFileDictLoader'); $v['Pinyin'] = $content; $v['py'] = $pinyin->abbr($content, ''); $v['pinyin'] = $pinyin->permalink($content, ''); return $v; 返回结果 ![](https://img.kancloud.cn/84/cb/84cb732ce73abd135d95c325c7ea1dcb_939x85.png) htmp的封装方法,curl等 $result = \GuzzleHttp\json_decode($result, true); 详情:[https://guzzle-cn.readthedocs.io/zh_CN/latest/](https://guzzle-cn.readthedocs.io/zh_CN/latest/)