What is the method of golang calling php7
In this issue, the editor will bring you about the method of golang calling php7. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
Golang calls php7
Use https://github.com/taowen/go-php7
Based on the modification of https://github.com/deuill/go-php, fork cause (https://github.com/deuill/go-php/issues/32)
Execute the php file func Test_exec (t * testing.T) {engine.Initialize () ctx: = & engine.Context {Output: os.Stdout,} err: = engine.RequestStartup (ctx) if err! = nil {fmt.Println (err)} defer engine.RequestShutdown (ctx) err = ctx.Exec ("/ tmp/index.php") if err! = nil {fmt.Println (err)}}
The content of / tmp/index.php is