mirror of
https://github.com/deuill/go-php.git
synced 2024-09-21 08:50:45 +00:00
Simplify README example.y
This commit is contained in:
parent
6fa93f5160
commit
7c4bcb9847
@ -20,20 +20,15 @@ Executing a script is very simple:
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
|
||||
php "github.com/deuill/go-php"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var b bytes.Buffer
|
||||
|
||||
engine, _ := php.New()
|
||||
context, _ := engine.NewContext(&b)
|
||||
context, _ := engine.NewContext(os.Stdout)
|
||||
|
||||
context.Exec("src/index.php")
|
||||
b.WriteTo(os.Stdout)
|
||||
context.Exec("index.php")
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user