Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Send a file
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1451 of 1476
Post > Topic >>

Send a file

by dermot@[EMAIL PROTECTED] (Beginner) Feb 19, 2008 at 12:15 PM

Hi,

I am trying to send a file in response to a request but am having 
trouble.

Here's what I have so far. I am not certain what the headers should 
be. I am not getting any more info from my error_log except Premature 
end of script headers.


my $s = (stat($file))[7];

my $filename = $user.'.csv';
seek $fh,0,0;
print header(-type=>"text/tab-separated-values",-Content_length=>$s, 	
	-Content_Disposition=>"attachment;filename=$filename");
print $fh;
close($fh);


Can anyone offer some advice?
Thanx,
Dp.
 




 2 Posts in Topic:
Send a file
dermot@[EMAIL PROTECTED]   2008-02-19 12:15:12 
Re: Send a file
daggerquill@[EMAIL PROTEC  2008-02-19 10:02:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 6:43:06 CDT 2008.