在PHP中运行Perl脚本-Plesk 11 [英] Run a Perl script in PHP - Plesk 11
问题描述
如何在服务器的每个页面中运行Perl脚本?
How can I run a a Perl script in every page of the server?
我将代码放置在/var/www/cgi-bin
上,现在我需要正确的代码来运行它.我应该把它放在哪里.
I put the code at /var/www/cgi-bin
, now I need the correct the code to run it. Where should I place it.
我已将此代码添加到httpd.conf中:
I have added this code to the httpd.conf:
- 操作页脚/cgi-bin/script.cgi
- AddHandler add-footer .htm .htm
在网站上,我已经添加了代码脚本.
and on the site I have added the code script.
如果页面是.html,则代码会运行,但是页面是PHP,则代码不会运行.
If the page is .html the code runs but is the page is PHP the code does not run.
我已经尝试过了,但是不能用,在HTML文件上可以用,但是在PHP上不能用
I have tried this but is does not work, in works on HTML files but not in PHP
<Directory / >
Options +ExecCGI
AddHandler cgi-script .cgi .pl
AddHandler application/x-httpd-php5 .php
AddHandler application/x-httpd-php .html .htm
AddHandler php-cgi .php
AddHandler cgi-script cgi pl
AddHandler cgi-script .html
AddHandler cgi-script .php
Action add-footer /cgi-bin/script.cgi
AddHandler add-footer .html .htm .php php
</Directory>
推荐答案
我尝试的方式不适用于动态内容,而仅适用于静态内容.
The way I was trying does not work with Dynamic Content it only work with Static Content.
这篇关于在PHP中运行Perl脚本-Plesk 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!