How can I call a Perl script from PHP?

后端 未结 4 1991
無奈伤痛
無奈伤痛 2021-01-02 06:12

I am interested in knowing the ways we can call/run Perl scripts in PHP.

相关标签:
4条回答
  • 2021-01-02 06:28

    Use something like

    system("/your/kewl/script.pl");
    
    0 讨论(0)
  • 2021-01-02 06:37

    You can make use of

    • system
    • exec
    • backtick operator
    0 讨论(0)
  • 2021-01-02 06:39

    Just like any other executable.

    But avoid it, it's very inefficient. What do you want to achieve by doing it?

    0 讨论(0)
  • 2021-01-02 06:40

    You can use a simple Php Perl extension within the Php code. This will allow you to execute code and Perl variables,functions and instantiate objects.

    $perl = new Perl();
    $perl->require("test1.pl");
    
    0 讨论(0)
提交回复
热议问题