Thread Datei upload in Datenbank (13 answers)
Opened by sike at 2006-07-11 19:40

renee
 2006-07-12 15:38
#34527 #34527
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;
use warnings;
use DBI;

my $dbh = DBI->connect(...) or die $DBI::errstr;
my $select = q~SELECT boot FROM infos~;
my $sth = $dbh->prepare($select) or die $dbh->errstr();
$sth->execute();

my ($bin) = $sth->fetchrow_array();

my $target = '/path/to/target.file';
open(my $fh,'>',$target) or die $!;
binmode $fh;
print $fh $bin;
close $fh or die $!;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Datei upload in Datenbank