diff --git a/README.md b/README.md index b3b9266..e5b23f3 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,36 @@ * Url_encode => url_encode * Url_decode => url_decode * Http_build_query => http_build_query -* Uniqid => uniqid \ No newline at end of file +* Uniqid => uniqid + +# 使用方法 +1. Go module + + `require github.com/zhijianwu/php latest` + + 上面内容加入go.mod文件内 + + `go mod vendor` +2. Go package + + `go get -v github.com/zhijianwu/php` + +3. Example + +```go +package main + +import ( + "fmt" + "github.com/zhijianwu/php" +) + +func main() { + fmt.Println(php.Time()) + fmt.Println(php.Date("2006~~~01#02",php.Time())) +} + +//console +1563257169 +2019~~~07#16 +``` \ No newline at end of file