Forum Webscript.Ru

Программирование => Perl => Тема начата: от 05 Марта 2002, 23:52:07

Название: problema upload (filename?)
Отправлено: от 05 Марта 2002, 23:52:07
est\' takoe chudo, nada 4tobi ono umelo peredavat\' filename..
kak sdelat\' - ne znaju...podskazhite pls.!

#!/usr/bin/perl

use CGI qw(:standard);

$Name=param ("file1");
$ifilename=param("file_name");
{
    open FWR, ">$ifilename";
    binmode FWR;

    print FWR while (<$Name>);
    close FWR;
}

############## H T M L F O R M######################
print "Content-type:text/html\\n\\n";

print "\\n";
print "

Type the names of files to be uploaded:


";

print $Name, "\\n";
print $buf, "\\n";
print \'
\',"\\n";
print "
1.\\n";
print "";
print "

\\n";
print "

\\n";
print "

";
print "\\n";
Название: см. документацию к CGI
Отправлено: Green Kakadu от 06 Марта 2002, 01:43:40
См. документацию по CGI, в частности функцию upload ;)
а еще на этом форуме в ФАКе, Chs цельный, работоспособный  код скрипта загрузчика файлов привел