I am interested in knowing the ways we can call/run Perl scripts in PHP.
我有兴趣了解我们可以在PHP中调用/运行Perl脚本的方法。
4 个解决方案
#1
15
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.
您可以在Php代码中使用简单的Php Perl扩展。这将允许您执行代码和Perl变量,函数和实例化对象。
$perl = new Perl();
$perl->require("test1.pl");
#3
2
Just like any other executable.
就像其他可执行文件一样。
But avoid it, it's very inefficient. What do you want to achieve by doing it?
但要避免它,效率非常低。这样做你想要达到什么目的?
#4
1
Use something like
使用类似的东西
system("/your/kewl/script.pl");
#1
15
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.
您可以在Php代码中使用简单的Php Perl扩展。这将允许您执行代码和Perl变量,函数和实例化对象。
$perl = new Perl();
$perl->require("test1.pl");
#2
#3
2
Just like any other executable.
就像其他可执行文件一样。
But avoid it, it's very inefficient. What do you want to achieve by doing it?
但要避免它,效率非常低。这样做你想要达到什么目的?
#4
1
Use something like
使用类似的东西
system("/your/kewl/script.pl");