Comments (22)
为啥不贴一下代码。。。
from pinyin.
require __DIR__ . '/vendor/autoload.php';
use Overtrue\Pinyin\Pinyin;
$pinyin_str = Pinyin::sentence('事后学生和家长道歉');
echo '<pre>';
print_r($pinyin_str);
echo '</pre>';
from pinyin.
更新版本吧,新版正常:
@overtrue ➜ ~/www/pinyin (master ✗)
$ ./bin/pinyin 事后家长和学生道歉 --method=sentence --tone-style=symbol
shì hòu jiā zhǎng hé xué sheng dào qiàn
from pinyin.
from pinyin.
我拉了最新的代码,试了不行啊
之前的旧代码似乎也跟现在是一样的 4月 28号的
from pinyin.
最新版是 5.1.1, composer info overtrue/pinyin
看看你的版本。
from pinyin.
报错了……
composer info overtrue/pinyin
[InvalidArgumentException]
Package "overtrue/pinyin" not found, try using --all (-a) to show all available packages.
单独 composer info 没看到o开头的包
from pinyin.
那你怎么使用的?
from pinyin.
根目录新建api.php
require DIR . '/vendor/autoload.php';
事先composer install 生成vendor目录
from pinyin.
vendor 目录下没有 overtrue/pinyin 这个目录么?
from pinyin.
没有, 我是git下载你的项目的,还有那个
`
使用 Composer 安装:
composer require overtrue/pinyin:^5.0`
命令我这会报错: Root package 'overtrue/pinyin' cannot require itself in its composer.json
from pinyin.
肯定不是 git 下载哈,而且你的报错是因为你在 vendor/overtrue/pinyin 目录运行 composer,为啥要在这里运行这个命令呢?应该是在你的项目目录里 composer require overtrue/pinyin:^5.0
from pinyin.
from pinyin.
不要在我的包目录你执行这个命令…… 在你自己的项目里 composer require
from pinyin.
这句英文翻译一下花不了几秒钟的
from pinyin.
翻译过的
好, 我看看
from pinyin.
使用composer require overtrue/pinyin:^5.1.1重新安装可以了
from pinyin.
from pinyin.
有缓存, 好了666
from pinyin.
现在一会cháng一会zhǎng /_ \
from pinyin.
所以你怀疑你的电脑 CPU 在逗你玩?
from pinyin.
from pinyin.
Related Issues (20)
- 褚 名字 发音chu HOT 1
- 语句中带英文字母的转化为空 HOT 2
- 咳 有 两个 读音 hai(第一声) ke(第二声) HOT 1
- 如何获取包含数字/英文/中文的首字母 HOT 1
- 拓 HOT 1
- 貟或者贠 在当作姓氏时,为yùn
- 提取首字母小bug HOT 2
- Laravel 命名空间方式无法使用 PINYIN_UNICODE
- 可以添加遇到不能翻译的特殊字符如➕ 等。保持原样输出 HOT 3
- 名字“乐慧英”,拼音是lehuiying,而不是yuehuiying HOT 3
- 读音有误的感觉 HOT 2
- 5.0 语法设计 HOT 10
- Error in data HOT 3
- 保留标点不生效 HOT 4
- 安装版本要求太高,能否兼容 php 7 HOT 1
- 关于 女 这个 拼音 HOT 5
- 如何转首拼或者全拼的字符串中如果是1111 四个数字开头的字符串会转换失败,报错信息和代码我放下面了 HOT 5
- $pinyin = Pinyin::polyphones('你电脑电脑电脑什么的',Converter::TONE_STYLE_NUMBER); HOT 1
- 腾讯云自动检测会报警 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinyin.