Home  >  Article  >  Backend Development  >  Go 嵌入 PHP 脚本:GoEmPHP

Go 嵌入 PHP 脚本:GoEmPHP

WBOY
WBOYOriginal
2016-06-23 13:33:221888browse

GoEmPHP 可以让你在 Go 程序中嵌入 PHP 脚本。

示例代码:

script = php.New()script.Startup()defer script.Close()if err := script.Eval("phpinfo();"); err != nil {    log.Fatal(err)}if err := script.Exec("foobar.php"); err != nil {    log.Fatal(err)}

项目主页:http://www.open-open.com/lib/view/home/1433317858775

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn