RE: [PHP] Protecting files in PHP

From: Date: Tue, 01 Oct 2002 19:08:49 +0000
Subject: RE: [PHP] Protecting files in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-118411@lists.php.net to get a copy of this message
> I have some files off of the web root which I'd like to be able to serve > up > to users (*.doc, *.xls). I know I can do this with header(), but how do I > reference a file that's outside of the webroot? Thanks! You can use an absolute or relative path, just like any other reference. Send the appropriate headers and then use readfile() to send the data. ---John Holmes...

« previous php.general (#118411) next »