[SOLVED]RE: [PHP] restricted file access
| From: | Angelo Zanetti | Date: | Fri, 29 Aug 2008 14:01:31 +0000 |
| Subject: | [SOLVED]RE: [PHP] restricted file access | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278963@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: tedd [mailto:tedd.sperling@gmail.com]
Sent: 28 August 2008 21:19
To: php-general@lists.php.net
Subject: RE: [PHP] restricted file access
At 10:50 AM +0200 8/28/08, Angelo Zanetti wrote:
>Thanks for your reply.
>
>But what happens if the file is situated here:
>
>www.site.com/include/documents/file.doc
>
>
>and someone knows that path file somehow or they get a program to crawl the
>site. Then they would be able to get that file. How do we prevent that?
You don't!
But file.doc doesn't have to be anything either.
Try this:
http://sperling.com/file.doc -- you won't find
anything there.
However, if I wanted something to be there for someone, I could put it
there.
Understand?
//////////////////////////////////////////////
Hi guys
I put the documents outside the webroot. And just redirect to it using the
Headers and then the readfile() function.
Thanks
Angelo
http://www.elemental.co.za
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php