cgi 目录和使用

所属栏目:建站知识    作者来源:合肥网站建设     发布时间:2015-03-14 17:18:00     浏览次数:2175

答:用户编写的CGI程序应该放在服务器端的CGI-BIN目录下,且目录及文件属性应改为755。下面是我公司提供的一段CGI测试程序,如果此程序放在用户的空间中可以正常运行,说明服务器端没有问题,请用户检查程序。

#!/bin/sh

echo Content-type: text/plain

echo

/bin/date

测试 PREL 程序:

#!/usr/bin/perl

use CGI qw(:standard);

use strict;

print header;

print "<B>Hello, World!</B>";