init
This commit is contained in:
parent
883593849d
commit
58e5dd8a08
21
README.md
Normal file
21
README.md
Normal file
|
@ -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','系统挂了');
|
||||
|
||||
```
|
|
@ -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"
|
||||
]
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue
Block a user