Include?
| From: | Shawn McKenzie | Date: | Thu, 12 Dec 2002 17:53:37 +0000 |
| Subject: | Include? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128045@lists.php.net to get a copy of this message | ||
It seems that if I create a php file in my dir at my hosting provider and do
include('/etc/passwd'); then wow, I see the contents of etc/passwd!
Is this expected behavior???
I am looking at creating a script that takes a var in the url and includes
the requested file. The purpose would be for only URLs
(myscript.php?page=http://mysite.com/dir/cool.html,
or relative URLs
(myscript.php?page=/dir/cool.html).
Can I do this without allowing someone to include files by filesystem
reference???
Thanks!
Shawn