PHP code example of emnabs / yii2-smser
1. Go to this page and download the library: Download emnabs/yii2-smser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
emnabs / yii2-smser example snippets
//configure component:
return [
//....
'components' => [
//....
'smser' => [
'class' => 'emhome\smser\Smser',
],
//....
]
];
Yii::$app->smser->compose()
->setMobile(['手机号码'])
->setContent('短信内容')
->send();
php composer.phar