Php $ _SERVER ['REQUEST_URI'] encoding issue?
3 answers
This is because you echo it to the browser - &sub
interpreted as an HTML object (& sub;).
If you are echo htmlentities($_SERVER['REQUEST_URI']);
, you will get what you expect.
You must be using the correct encoding for the environment you are in - in HTML, which means using &
.
+4
source to share