#!/usr/bin/perl
use strict;
use warnings;
use CGI;
my $q = new CGI;
my $param = $ENV{'QUERY_STRING'};
my @param = split (/&/,$param);
print $q->header(-charset=>"shift-jis");
print $q->start_html(-title=>"Aizack Lab", -BGCOLOR=>'#ffffff'),
$q->center($q->h1('[perl] クエリ文字列取得サンプル')),
$q->hr,
$q->br,
$q->br,
$q->strong("取得したクエリ文字列"),
$q->br,
$q->br;
foreach my $tmp (@param)
{
my ($name,$value) = split (/=/,$tmp);
print $q->strong("名前:$name 値:$value"),
$q->br;
}
print $q->end_html;
exit;
Trackback URL|http://aizack.net/sb.cgi/52
Comments