Skip to content

Commit dea4b81

Browse files
committed
update readme.md
1 parent a714343 commit dea4b81

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# JPush API client library for PHP - README
2-
3-
标签: JPush
4-
5-
---
6-
71
[![Build Status](https://travis-ci.org/jpush/jpush-api-php-client.svg?branch=master)](https://travis-ci.org/jpush/jpush-api-php-client)
82

93
# JPush API client library for PHP
@@ -21,8 +15,10 @@ PHP >= 5.3
2115
JPush PHP Library 使用 Composer管理项目依赖, 鉴于某些原因, 国内的用户使用Composer下载依赖库比较困难,所以我们将Composer依赖打包. 用户可以通过以下方式在您的项目中加入JPush PHP Library.
2216

2317

24-
1.下载依赖包 [vendor.tar.gz][3]
25-
2.解压 [vendor.tar.gz][4] 到您的项目目录下,在需要使用JPush的源文件头部 引入 `vendor/autoload.php` 既可使用。
18+
1.下载依赖包 [vendor.tar.gz][3]
19+
20+
2.解压 [vendor.tar.gz][4] 到您的项目目录下,在需要使用JPush的源文件头部 引入 `vendor/autoload.php` 既可使用.
21+
2622
```
2723
# 引入代码
2824
php require_once 'vendor/autoload.php';
@@ -117,20 +113,26 @@ foreach($result->received_list as $received) {
117113
## FAQ
118114

119115
Q: 运行示例提示 `require_once(vendor/autoload.php): failed to open stream` 怎么解决?
116+
120117
A: 下载下载依赖包 [vendor.tar.gz][3] 并解压到examples目录即可, 也可以使用composer管理依赖, 在composer.json中加入 `"jpush/jpush": "v3.2.0"` 并执行 `php composer.phar install` 即可.
121118

122-
Q: 运行示例提示
119+
Q: 运行示例提示
120+
123121
```
124122
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "jpush.log" could not be opened: failed to open stream: Permission denied
125123
```
126124
该如何解决?
125+
127126
A: 此问题是因为工程没有写入权限导致不能生成日志文件. 只需对赋予该项目对本目录的写入权限即可,如 `sudo chmod 777 example`
128127

128+
129129
Q: 使用示例每次推送都会打印推送的JSON, 如何禁止其打印?
130+
130131
A: 在调用示例推送的时候, 注释掉 `->printJSON()` 即可, 该函数可以打印当前构建的推送对象.
131132

132133

133134

135+
134136
## 文档
135137

136138
* [JPush Push API v3][7]

0 commit comments

Comments
 (0)