egroupware/phpgwapi/js/dhtmlxGantt/samples/02_data_load/cgi-bin/loadXML.pl

26 lines
457 B
Perl
Raw Normal View History

2011-11-16 20:31:00 +01:00
#!C:/Perl/bin/perl.exe -w
use CGI;
use IO::File;
use Fcntl qw(:DEFAULT :flock);
use File::Temp qw/ tempfile tempdir /;
#DATA
@qstring = split(/&/,$ENV{'QUERY_STRING'});
@filename = split(/=/,$qstring[0]);
$docroot = "$ENV{'DOCUMENT_ROOT'}";
$dataDir = "$docroot/data/";
$tmp = "";
open(FH,$dataDir.@filename[1]);
while($line = <FH>)
{
$tmp = $tmp.$line;
}
close(FH);
print "Content-type: text/xml\n\n";
print $tmp;
exit;