Re: slight quik question
| From: | Leif K-Brooks | Date: | Mon, 07 Apr 2003 08:00:26 +0000 |
| Subject: | Re: slight quik question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142655@lists.php.net to get a copy of this message | ||
Be careful with that, a hacker could use it to gain access to sensitve files. Feeding it a name like "../foo/bar", for example, would provide access to path/to/foo/bar.
Martin Towell wrote:
something like: URL: http://site.com/get_image.php?name=image_name_here.jpg SRC: <? if (file_exists("path/to/file/$name")) passthru("path/to/file/$name"); else passthru("path/to/file/nofile_image.gif"); ?> (you'll need to check the spelling of passthru... maybe it's readfile() - or something...) -----Original Message----- From: daniel [mailto:daniel@electroteque.org] Sent: Monday, April 07, 2003 12:00 PM To: php-general@lists.php.net Subject: [PHP] slight quik question hi guys i have been working on a photo gallery script for some time now , i have some issues i may need help with , i have public and private galleries i am setting up , although the images are stored in the document directory and would still be viewable by accessing them directly instead of the gallery script , how would it be possible to store the images outside the web path and be viewable in the page without having to use gd to do it ?-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.