PHP code example of firstphp / hyperf-qcloudsms
1. Go to this page and download the library: Download firstphp/hyperf-qcloudsms 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/ */
firstphp / hyperf-qcloudsms example snippets
QCLOUD_SMS_APP_ID=1107983205
QCLOUD_SMS_APP_KEY=8e6df0qr843b49opd8353d1d2802d435
QCLOUD_SMS_TEMPLATE_ID=129402
QCLOUD_SMS_SIGN=小蚂蚁
use Firstphp\HyperfQcloudsms\QcloundSmsInterface;
......
/**
* @Inject
* @var QcloundSmsInterface
*/
protected $qcloundSmsInterface;
public function test() {
$res = $this->qcloundSmsInterface->sendWithParam($nationCode, $phoneNumber, $templId, $params, $sign, $extend, $ext);
var_dump($res);
}