- 论坛徽章:
- 0
|
#!/usr/bin/perl -w
use CGI;
use DBI;
my $dbh = DBI->connect("dbi:Oracle:host=10.197.104.198;sid=HCPTEST","hcp","hcp");
my $sqr = $dbh->prepare("SELECT * FROM hr.jobs");
$sqr->execute();
$q=new CGI;
print $q->header(-charset=>"gb2312"),
$q->start_html(),"<div>";
while(my @ref = $sqr->fetchrow_array()) {
#my @refo=split(/ /,$refo);
print "$ref[0]$ref[1]$ref[2]$ref[3]\n";
}
print "</div>",$q->end_html,"\n";
$dbh->disconnect;
|
[root@es4 gprism]# ./o.cgi
Content-Type: text/html; charset=gb2312
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"><head><title>Untitled Document</title>
</head><body><div>AD_PRESPresident2000040000
AD_VPAdministration Vice President1500030000
AD_ASSTAdministration Assistant30006000
FI_MGRFinance Manager820016000
FI_ACCOUNTAccountant42009000
AC_MGRAccounting Manager820016000
AC_ACCOUNTPublic Accountant42009000
SA_MANSales Manager1000020000
SA_REPSales Representative600012000
PU_MANPurchasing Manager800015000
PU_CLERKPurchasing Clerk25005500
ST_MANStock Manager55008500
ST_CLERKStock Clerk20005000
SH_CLERKShipping Clerk25005500
IT_PROGProgrammer400010000
MK_MANMarketing Manager900015000
MK_REPMarketing Representative40009000
HR_REPHuman Resources Representative40009000
PR_REPPublic Relations Representative450010500
</div></body></html>
权限 755
但是ie访问
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/2.0.52 (Red Hat) Server at es4 Port 80
其他cgi运行正常
高手帮看看是什么问题 |
|