1
0
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:
Alex Palaistras 2015-09-22 21:33:33 +01:00
parent 6fa93f5160
commit 7c4bcb9847

View File

@ -20,20 +20,15 @@ Executing a script is very simple:
package main package main
import ( import (
"bytes"
"os" "os"
php "github.com/deuill/go-php" php "github.com/deuill/go-php"
) )
func main() { func main() {
var b bytes.Buffer
engine, _ := php.New() engine, _ := php.New()
context, _ := engine.NewContext(&b) context, _ := engine.NewContext(os.Stdout)
context.Exec("src/index.php") context.Exec("index.php")
b.WriteTo(os.Stdout)
} }
``` ```