tags:

views:

247

answers:

2

When I output $_SERVER['REQUEST_URI']; on:

http://localhost/tools/?tool=cs&sub=1

I get:

/tools/?tool=cs⊂=1

Is there other solution to get /tools/?tool=cs&sub=1 besides using & instead of & ?

+3  A: 
Greg
If you are working with UTF-8, I would recommend you using htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES, "UTF-8").
Alex
A: 

How are you outputting this value? If you're dumping it to the browser, are you sure it's not trying to 'decode' embedded ampersands?

Try a file with just

<?php phpinfo();

and look to see what the value is displayed as (near the bottom)

ptomli