Skip to content

Commit

Permalink
0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
moonwalkercui committed Feb 24, 2020
1 parent 5382162 commit 43d7fd2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Postermaker 海报生成器
A poster make base on gd lib. (PHP) 一个用php生成海报的神器

# Useage 用法
# Usage 用法

比如在文件someaction.php中使用:
```
Expand Down Expand Up @@ -50,6 +50,15 @@ $poster->render('./save.png'); // 保持为图片
// or
$poster->render(); // show image in html: `<img src="someaction.php" style="border-radius: 20px;"/>`
```
# Thinkphp等框架里中的使用
因为有些php框架的控制器默认输出html,所以如果在控制器里直接输出图片的话,需要在控制器最后一行加上:
```
return response()->contentType('image/png');
```
或者用exit
```
exit();
```

# Author
Ryan
Expand Down

0 comments on commit 43d7fd2

Please sign in to comment.