简体   繁体   English

从PHP调用Perl脚本

[英]Call Perl script from PHP

I am using the following statements to execute a Perl script from a web site using PHP. 我正在使用以下语句从使用PHP的网站执行Perl脚本。

$perl = shell_exec('perl '.$dest.'/script.pl 2>&1 '.$mail.' '.str_replace("/", "\\", $dest));

I want to run the script server side, but it seems that it uses the Perl that is installed on the client so someone that has not installed Perl could not run the script. 我想运行脚本服务器端,但似乎它使用客户端上安装的Perl,因此尚未安装Perl的人无法运行脚本。

I can't figure out what I am missing. 我不知道我想念的是什么。

EDIT: I run: 编辑:我运行:

$perl = shell_exec('C:\\Perl\\bin\\perl.exe -v'); $ perl = shell_exec('C:\\ Perl \\ bin \\ perl.exe -v');

and figure out that was Perl server side running. 并确定这是Perl服务器端正在运行。 So now I have to understand why some clients can't execute script. 因此,现在我必须了解为什么某些客户端无法执行脚本。

EDIT 2: It is definitely a permission issue, only administrator could write. 编辑2:这绝对是一个权限问题,只有管理员可以写。 I' ll manage the permission. 我将管理许可。

There is no possibility that the IIS server is running perl.exe on the client machine. IIS服务器不可能在客户端计算机上运行perl.exe The HTTP protocol doesn't provide for anything like that HTTP协议没有提供类似的功能

You don't say why you think this is happening, so we can't help you any further 您没有说为什么会这样,所以我们无法再为您提供帮助

I can only suggest that you're using the same machine for both client and server and have confused yourself 我只能建议您为客户端和服务器使用同一台计算机,并对自己感到困惑

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM