Download the PHP package youyiio/beyong-sms without Composer

On this page you can find all versions of the php package youyiio/beyong-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package beyong-sms

beyong-sms

一款支持多家短信服务商优美的短信发送库,ThinkPHP系列框架【5.0.x,5.1.x,6.0.x】开箱即用,其他框架初始化配置即可使用

基于 阿里云、腾讯云、极光最新短信发送功能的极简包 二次开发, 为ThinkPHP系列框架量身定制, 使 ThinkPHP 支持短信模板、纯文本发送以及更多短信功能, 短信发送简单到只需一行代码

github地址

目录

优雅的发送短信

ThinkPHP5/6 示例

安装

使用 Composer 安装 (强烈推荐):

支持 psr-4 规范, 开箱即用

github下载 或 直接手动下载源码:

需手动引入自动载入文件

下载文件:

git clone https://github.com/youyiio/beyong-sms beyong-sms

引入自动载入文件:

使用时引入或者全局自动引入

require_once '/path/to/beyong-sms/src/autoload.php;

配置

在配置文件里配置如下信息, 可以配置在 sms.phpconfig.php 文件中, 内容如下:

部分配置详解

driver

可选值是字符串,只能是 aliyun|tencent|jiguang

key & secret

在短信提供商注册时的密钥

log_driver

日志驱动,如果不配置则为类库自带简单的日志驱动 \beyong\sms\log\File::class,可自定义配置为框架的日志驱动,例如 'log_driver' => '\\think\\Log',日志驱动类必须实现静态方法 write,例如:

log_path

日志驱动为默认是日志存储路径,不配置默认为 beyong-sms/log/,例如可配置为 ROOT_PATH . 'runtime/log/'

使用

以下示例以 ThinkPHP5 里使用为例, 其他框架完全一样

使用beyong-sms

创建实例

不传递任何参数表示短信驱动使用配置文件里默认的配置

设置收件人

以下几种方式任选一种

设置短信内容-template

或者使用变量替换模板内容

设置短信内容

示例

Issues

如果有遇到问题请提交 issues

License

Apache 2.0


All versions of beyong-sms with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package youyiio/beyong-sms contains the following files

Loading the files please wait ....