Re: Defining PHP varibles from URL
| From: | Miguel Cruz | Date: | Sun, 05 May 2002 07:08:34 +0000 |
| Subject: | Re: Defining PHP varibles from URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96122@lists.php.net to get a copy of this message | ||
On Sun, 5 May 2002 webmaster@tececo.com wrote:
> I can't seem to define a varible from the url entered into a browser.
>
> I wish to use the following code or something like it.
> <script language="php">
>
> $file = "";
> //the above is defined from the url
> include "$file";
> </script>
>
> 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