Re: path problems
| From: | Scott Taylor | Date: | Wed, 28 Jan 2004 01:22:46 +0000 |
| Subject: | Re: path problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175990@lists.php.net to get a copy of this message | ||
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/httpdocs */
$file = $_SERVER['DOCUMENT_ROOT'] . '/archive/newsletters/Dec03.pdf';
readfile($file);
/* example 2 */
$file = 'archive/newsletters/Dec03.pdf';
readfile($file);
Thanks for the help so far,
Best Regards,
Scott
-----Original Message----- From: Scott Taylor [mailto:scotttaylor@bigfoot.com] Sent: Tuesday, January 27, 2004 12:34 PM To: php-general@lists.php.net 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 does this filesize('http://domain.com/archive/newsletters/Dec03.pdf'); For some reason this works: readfile('http://domain.com/archive/newsletters/Dec03.pdf'); but this does not: readfile('/archive/newsletters/Dec03.pdf'); nor does this: readfile('archive/newsletters/Dec03.pdf'); Can someone explain this to me? Thanks for all the help, Scott Taylor