mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
22 lines
331 B
Go
22 lines
331 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/dunglas/frankenphp"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) <= 1 {
|
|
log.Println("Usage: testcli script.php")
|
|
os.Exit(1)
|
|
}
|
|
|
|
if len(os.Args) == 3 && os.Args[1] == "-r" {
|
|
os.Exit(frankenphp.ExecutePHPCode(os.Args[2]))
|
|
}
|
|
|
|
os.Exit(frankenphp.ExecuteScriptCLI(os.Args[1], os.Args))
|
|
}
|