#!/usr/bin/perl use DBI; #use DBI::mysql; use POSIX; use SDBM_File; use warnings; use strict; my @ary = DBI->available_drivers(); # Aceste linii afiseaza driverele disponibile pe sistemul dvs. print join("\n", @ary), "\n"; my %dbm; my $db_file = "demo.dbm"; tie %dbm, 'SDBM_File', $db_file, O_RDWR, 0 or die "error open $db_file: $!\n"; my $dbh = DBI->connect('dbi:DBM:'); $dbh->{RaiseError} = 1; #@driver_names = DBI->available_drivers; $dbh->disconnect; print "Content-type: text/html\n\n"; print <<HTML; <html> <head> <title>Salut</title> </head> <body bgcolor="white" text="blue"> <p>SALUT!</p. </body> <html> HTML
Resurse:
http://zetcode.com/db/mysqlperl/dbi/
Niciun comentariu:
Trimiteți un comentariu