hm ok..
but thats not new to me.. the code i show you is only part of an package. the cgi object lies in the main. for that itīs not a scoping issue.
my $filename = $q->param('upload_file');
gives exactly the filename of the uploaded file. but not full qualified.
here you are right:
$CGI::DISABLE_UPLOADS
$main::q is initialised in the main with
our $q = new cgi;
but the attribute should set like
use CGI qw/:standard/;
use CGI::Carp 'fatalsToBrowser';
$CGI::POST_MAX=1024 * 100; # max 100K posts
$CGI::DISABLE_UPLOADS = 1; # no uploads
thanks for the pointer.
like Eliya said:
my $filename = $q->param('upload_file'); # returns (client-side)
+name of the file
my $filehandle = $q->upload('upload_file'); # returns handle to the
+server-side temp file
thats still my code. but the filehandle is empty. thats what i want to fix. i want to know what this function do:
$q->upload('upload_file'); because it might be that there is a problem with fetching the data from the client..?!
sorry 4 my worse diction..
$perlig =~ s/pec/cep/g if 'errors expected';
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.