Re: [PHP] path problems

2004-01-28 Thread Scott Taylor
Stuart wrote: Scott Taylor wrote: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; Try replacing this line with... $file_two = $_SERVER['DOCUMENT_ROOT'].'/archive/newsletters/Dec03PostPress.pdf'; As my first posts states, I've tried that. And no, that doesn't work either. And on

Re: [PHP] path problems

2004-01-28 Thread Stuart
Scott Taylor wrote: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; Try replacing this line with... $file_two = $_SERVER['DOCUMENT_ROOT'].'/archive/newsletters/Dec03PostPress.pdf'; -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] path problems

2004-01-28 Thread Scott Taylor
Yes, the error I get is a pop-up box saying "This is not a valid %PDF file" Here is my code: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; //now view the PDF file header("Content-Type: application/pdf"); header("Accept-Ranges: bytes"); header("Content-Length: ".filesi

Re: [PHP] path problems

2004-01-27 Thread - Edwin -
On Tue, 27 Jan 2004 20:22:46 -0500 Scott Taylor <[EMAIL PROTECTED]> wrote: > I understand all of the file size ones. What I really don't > understand is why neither of the following examples work: > > /* example 1 */ > /* where $_SERVER['DOCUMENT_ROOT'] = > /usr/local/psa/home/vhosts/domain.com/

Re: [PHP] path problems

2004-01-27 Thread Scott Taylor
12:34 PM To: [EMAIL PROTECTED] Subject: [PHP] path problems I have the following file: http://domain.com/archive/newsletters/Dec03.pdf For some reason this works: filesize('archive/newsletters/Dec03.pdf'); but this does not: filesize('/archive/newsletters/Dec03.pdf'); nor do

Re: [PHP] path problems

2004-01-27 Thread Stuart
Scott Taylor wrote: I have the following file: http://domain.com/archive/newsletters/Dec03.pdf Lovely. For some reason this works: filesize('archive/newsletters/Dec03.pdf'); Relative path from the current directory. Is your script in the web root? but this does not: filesize('/archive/newslette

[PHP] path problems

2004-01-27 Thread Scott Taylor
I have the following file: http://domain.com/archive/newsletters/Dec03.pdf For some reason this works: filesize('archive/newsletters/Dec03.pdf'); but this does not: filesize('/archive/newsletters/Dec03.pdf'); nor does this filesize('http://domain.com/archive/newsletters/Dec03.pdf'); For some r