cmonlinecn has asked for the wisdom of the Perl Monks concerning the following question:
use DBI; my ($Driver, $DSN); $DSN = "DBI:mysql:database=forums;host=10.xx.xx.xx;port=3306"; $dbh = DBI->connect($DSN, "xxxxx", "xxxx"); print "ContentŁtype:text/html\n\n"; print "< html>"; print "< head>"; print "< title>this is a test< /title>"; print "< /head>"; if($dbh) { print "< body>< p>OK success !< /body>"; } else { print "< body>< p>fail<p> $DBI::errstr< /body>"; } print "< /html>"; exit;
Edit by castaway added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI connection fail!
by izut (Chaplain) on Sep 27, 2005 at 11:17 UTC | |
by jbrugger (Parson) on Sep 27, 2005 at 12:10 UTC | |
by etm117 (Pilgrim) on Sep 27, 2005 at 13:43 UTC |