【发布时间】:2010-06-01 19:05:23
【问题描述】:
在 html 文件中:
<!--#exec cgi="/cgi-bin/test.pl"-->
perl 脚本:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "<input type=\"hidden\" name=\"aname\" value=\"avalue\">\n";
print "<img src=\"/cgi-bin/script.pl\" />";
这不会给我一个“错误处理指令”错误,也不会输出我的 HTML 代替标记。我还要补充一点,ssi 标签被替换为空。
【问题讨论】:
-
您能以相同的方式运行其他 CGI(使用服务器端包含)吗?你确定你的 httpd 配置正确吗?
-
是的,我添加了 Options +Includes(不知道需要设置其他任何内容),这很奇怪,它只是将 exec 标记替换为什么都没有。