[PHP] Problem with readfile

2003-08-27 Thread French, Alastair
Hi all I am using the following to pass a file to the client header("Content-type: ". $row['filetype'] ); $path = ROOT_PATH . "file_uploads/"; $real_filename = $path . $row['location'] . '/' .$row['filename']; header("Content-Disposition: attachment; filename= " . $row['filename']); readfile($r

[PHP] Problem with readfile() and HTTP headers (vs. server-side include)

2003-03-27 Thread Kerry Shetline
I'm trying to figure out how to make readfile() or include() work more like a server-side #include, in terms of HTTP headers. I'm taking some web pages that used server-side includes, that in turn invoked CGI scripts, and replacing these pages with PHP pages. For the most part, I don't need a l

[PHP] Problem with readfile() and HTTP headers (vs. server-side include)

2003-03-27 Thread Kerry Shetline
I'm trying to figure out how to make readfile() or include() work more like a server-side #include, in terms of HTTP headers. I'm taking some web pages that used server-side includes, that in turn invoked CGI scripts, and replacing these pages with PHP pages. For the most part, I don't need a lot o

Re: [PHP] Problem with readfile on jpegs

2003-02-24 Thread Rick Emery
Show us code. The error refers to line 87. We need to see that, and other code surrounding 87. - Original Message - From: "Patrick Teague" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 6:45 AM Subject: [PHP] Problem with readfile on j

Re: [PHP] Problem with readfile on jpegs

2003-02-24 Thread Ernest E Vogelsinger
At 13:45 24.02.2003, Patrick Teague said: [snip] >readfile(include($afile)); [snip] You don't need to include the file you're going to read... simply give readfile($file) and you'll be set. include() tries to _ex

[PHP] Problem with readfile on jpegs

2003-02-24 Thread Patrick Teague
I found info on php.net about how to set content type for a file & then cause it to be a downloaded file. So far it's been working for showing everything until I tried having it display a jpeg. Here's the code I have - header("Content-type: ".$atype); readfile(include($afile)); The only problem