|< 1 2 >| | 14 Einträge, 2 Seiten |
QuoteThe temporary directory is selected using the following algorithm:
1. if the current user (e.g. "nobody") has a directory named
"tmp" in its home directory, use that (Unix systems only).
2. if the environment variable TMPDIR exists, use the location
indicated.
3. Otherwise try the locations /usr/tmp, /var/tmp, C:\temp,
/tmp, /temp, ::Temporary Items, and \WWW_ROOT.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package Sources::CGI;
use strict;
use warnings;
require CGI;
use vars qw(@ISA);
@ISA = qw( CGI );
sub getparam
{
my ($self, $what) = @_;
return $self->url_param($what) || $self->param($what);
}
sub urlencode
{
my $text = shift;
$text =~ s/([^a-z0-9_.!~*'( ) -])/sprintf "%%%02X", ord($1)/ei;
$text =~ tr/ /+/;
return $text;
}
sub redirect
{
my ($self, $uri) = @_;
# print "Status: 302 Moved\n";
print "Location: $uri\n\n";
exit(0);
}
1;
use Sources::CGI qw(-private_tempfiles);
QuoteThe temporary file will be deleted automatically when your program exits unless you manually rename it. On some operating systems (such as Windows NT), you will need to close the temporary file's filehandle before your program exits. Otherwise the attempt to delete the temporary file will fail.
|< 1 2 >| | 14 Einträge, 2 Seiten |