From 58e5dd8a089c71fcae8fbd8b86bb5cff29a8deec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Tue, 8 May 2018 15:40:54 +0800 Subject: [PATCH] init --- README.md | 21 +++++++++++++++++++++ composer.json | 5 +---- tests/text.php | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..367a056 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# 报警或通知 (PHP版) + +> 该项目使用 composer 来完成加载 + +执行 +```bash +composer config repositories.php-alert vcs git@git.int.haowumc.com:arch/php-alert-client.git +composer require arch/alert +``` + + +### 如何使用 + +```php +//通知单个或多个用户文本消息 +user_text_alert('dongwei|lisida','快去领红包'); + +//通知一个企业微信群文本消息 +chat_text_alert('api','系统挂了'); + +``` \ No newline at end of file diff --git a/composer.json b/composer.json index b801b4b..2f4316a 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "arch/notification", + "name": "arch/alert", "authors": [ { "name": "候学杰", @@ -7,9 +7,6 @@ } ], "autoload": { - "psr-4": { - "Arch\\Notification\\": "src/Notification" - }, "files": [ "src/functions.php" ] diff --git a/tests/text.php b/tests/text.php index 89e1cf1..65cc818 100644 --- a/tests/text.php +++ b/tests/text.php @@ -2,7 +2,7 @@ require_once dirname(__DIR__).'/vendor/autoload.php'; -$ret = notify('houxuejie','dfdfdf'); +$ret = user_text_alert('houxuejie','dfdfdf'); if( $ret['err_code'] == '0' ){ echo "发送成功\n"; }else{