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:[EMAIL PROTECTED] Sent: Tuesday, January 27, 2004 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 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




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



Reply via email to