Re: Passing a variable without ?var=
From: Ian.H (ian_at_WINDOZEdigiserv.net)
Date: 04/04/04
- Next message: marathon: "Re: Unwanted PHP Uploads"
- Previous message: J. Codling: "Re: Passing a variable without ?var="
- In reply to: J. Codling: "Re: Passing a variable without ?var="
- Next in thread: Ian.H: "Re: Passing a variable without ?var="
- Reply:(deleted message) Ian.H: "Re: Passing a variable without ?var="
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 04 Apr 2004 02:13:10 GMT
On Sat, 03 Apr 2004 21:08:08 -0500, J. Codling wrote:
> *This message represents the official opinions of the voices
> in my head*
>
> "Carl Wiles" <carlwiles@comcast.net> wrote in message
> news:DeSdnWXoqoITovLdRVn-uw@comcast.com...
> | as far as i know there isnt really a way to hide it, other
> than masking it.
> | i mean theoretically it kind of 'has' to be there.
>
> That is my conclusion so I abandoned the idea. It doesn't
> look all that unprofessional and if I wanted to hide the
> page names I could always change to a switch statement in
> the PHP instead. I like the way it is now so I'll just leave
> it that way.
>
> Thanks for the help though!
You could use PATH_INFO:
$pi = explode('/', $_SERVER['PATH_INFO']);
$page = $pi[0];
/**
* Do validation on $page to prevent exploitation
* left as an excercise =)
*/
[...]
require_once("$page.php");
Your URIs would then look something like:
This would then include 'bar.php'.
Just a possible alternative =)
Regards,
Ian
-- Ian.H digiServ Network London, UK http://digiserv.net/
- Next message: marathon: "Re: Unwanted PHP Uploads"
- Previous message: J. Codling: "Re: Passing a variable without ?var="
- In reply to: J. Codling: "Re: Passing a variable without ?var="
- Next in thread: Ian.H: "Re: Passing a variable without ?var="
- Reply:(deleted message) Ian.H: "Re: Passing a variable without ?var="
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|