[PHP-DB] BinaryWrite in PHP?

2003-02-12 Thread Ohlson Stefan
Hi!
I want to let the user to be able to open or save a textdocument with 
text that I create on the fly with some select-statements. 
You know when you click on a button or a link and you get a question
if you what to Open the file or or Save it.

In ASP I can use Response.BinaryWrite, how can I do it in PHP?

Thanks!

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] BinaryWrite in PHP?

2003-02-12 Thread George Pitcher
Stefan,

This works for me.

Some of my users (and me on some PCs) get a message alerting them about an
Active-X component, but if you ignore it, it has no affect,

?php
$fpd = path2file . $fp . .pdf;
$len = filesize($fpd);
header(Content-Type: application/pdf); // change to suit your file type
header(Content-Disposition: inline; filename=$fpd);
header(Content-Title: $fpd);
header(Content-Length: $len);
readfile($fpd);
?

George

 -Original Message-
 From: Ohlson Stefan [mailto:[EMAIL PROTECTED]]
 Sent: 12 February 2003 10:05 am
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] BinaryWrite in PHP?


 Hi!
 I want to let the user to be able to open or save a textdocument with
 text that I create on the fly with some select-statements.
 You know when you click on a button or a link and you get a question
 if you what to Open the file or or Save it.

 In ASP I can use Response.BinaryWrite, how can I do it in PHP?

 Thanks!

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php