marqu3s/yii2-nrsgateway
Composer 安装命令:
composer require marqu3s/yii2-nrsgateway
包简介
Yii2 NRSGateway extension.
关键字:
README 文档
README
Installation
Composer
The preferred way to install this extension is through Composer.
Either run
php composer.phar require marqu3s/yii2-nrsgateway "dev"
or add
"marqu3s/yii2-nrsgateway": "dev"
to the require section of your composer.json
Usage
Add to main.php components section:
[
'components' => [
...
'sms' => [
'class' => 'marqu3s\nrsgateway\YiiSMSService',
'username' => 'theUsername',
'password' => 'thePassword'
],
...
]
]
and use it:
$nrs = Yii::$app->sms->nrs; $nrs->to = ['xxxxxxxxxxxxx', 'yyyyyyyyyyyyy']; $nrs->from = 'Sender'; $nrs->msg = 'This is a test message.'; $result = $nrs->send();
Check $result variable for errors.
Original Author
João Marques, e-mail: joao@jjmf.com
统计信息
- 总下载量: 125
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-01