kveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: "Scot Robnett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Upload (probably a stupid question)
Date: Fri, 6 Dec 2002 10:37:11 -0600
How do I make my script only send the filename rathe
How do I make my script only send the filename rather than the full path
when I use the CGI.pm upload function?
For example, when I upload the document
test.xls
On the remote server, it's being named with the full path of where I sent it
from, like this
C:\Documents and Settings
On Friday, April 26, 2002, at 10:01 , Alex Read wrote:
[..]
> #!/usr/bin/perl
> use strict;
>
> defined(my $pid = fork ) or die "Could not fork: $!";
> if ($pid){
> print "Content-type: text/html\n\n";
> print "\nHI1\n\n\n\n";
> exit;
> } else {
>close(STDIN);
>close(STDOUT);
>close(S
> -Original Message-
> From: Alex Read [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 1:01 PM
> To: Bob Showalter
> Cc: [EMAIL PROTECTED]
> Subject: Re: Probably a stupid question
>
>
> Thanks guys,
>
> I think this should be able to do
Thanks guys,
I think this should be able to do what I want, as the browser goes
straight to the return page and prints 'HI1'.
Thanks again,
Alex
#!/usr/bin/perl
use strict;
defined(my $pid = fork ) or die "Could not fork: $!";
if ($pid){
print "Content-type: text/html\n\n";
print "\nHI1\n\n\
> -Original Message-
> From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 12:45 PM
> To: 'Alex Read'; [EMAIL PROTECTED]
> Subject: RE: Probably a stupid question
>
> ...
>
> The way to code this to do something like:
&
On Friday, April 26, 2002, at 09:40 , Alex Read wrote:
> Hello,
>
> OK, we now have the following;
>
> #!/usr/bin/perl
> use strict;
>
> my $pid = fork;
> if ($pid == 0){
> exec 'sleep 2; echo "hi"' || die "Cannot sleep: $!" ;
> } else {
> print "Content-type: text/html\n\n";
> print "\nhi\n\n\
> -Original Message-
> From: Alex Read [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 12:01 PM
> To: [EMAIL PROTECTED]
> Subject: Probably a stupid question
>
>
> Hello,
>
> OK, I have a nice a simple test case, but I just can't get it
>
Hello,
OK, we now have the following;
#!/usr/bin/perl
use strict;
my $pid = fork;
if ($pid == 0){
exec 'sleep 2; echo "hi"' || die "Cannot sleep: $!" ;
} else {
print "Content-type: text/html\n\n";
print "\nhi\n\n\n\n";
}
So the child process is the only one that sleeps for 2, then prints hi,
On Friday, April 26, 2002, at 09:01 , Alex Read wrote:
> Hello,
>
> OK, I have a nice a simple test case, but I just can't get it to do what
> I want it to.
[..]
>
> Alex.
>
>
> #!/usr/bin/perl
> use strict;
>
> my $pid = fork && exit; #$pid should return 0 if fork is
> successful.
>
> if (
Hello,
OK, I have a nice a simple test case, but I just can't get it to do what
I want it to. How do I get this so that when I hit submit it comes
straight back with my "hi" message instead of waiting until the sleep
command has finished? I've tried playing around with fork and how I
execute th
11 matches
Mail list logo