Re: Defining PHP varibles from URL

From: Date: Sun, 05 May 2002 09:41:24 +0000
Subject: Re: Defining PHP varibles from URL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-96140@lists.php.net to get a copy of this message
> > It could be what I was typing in the url bar. > > > > file.php?file=foobar.inc > > 1) Try include $_GET['file']; > > 2) Let me know where your server is so I can go to > > http://your.server/file.php?file=/etc/passwd > > miguel You might want to use .php file extension and /include/ directory to prevent Miquel stealing your pressious passwords :)) <snip> file.php?file=inc.foobar.php ------------------------- include("include/$file"); </snip> Just a thought :))) Teemu

« previous php.general (#96140) next »