Re: dealing with # in urls
| From: | CC Zona | Date: | Fri, 08 Mar 2002 07:33:00 +0000 |
| Subject: | Re: dealing with # in urls | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87743@lists.php.net to get a copy of this message | ||
In article <20020307225651.0260576CC@mail.mminternet.com>,
maggelet@mminternet.com (Mark) wrote:
> in php.ini there is a variable called arg separator.input that looks
> like it can help but when I add the line:
>
> arg separator.input = "&#"
>
> I still get $id = "0#top"
Did you restart the server after modifying php.ini?
As for "http://mysite.com/test.php?id=0#top"
sometimes resulting in id='0'
and sometimes id='0#', perhaps this is a situation where letting PHP
register the globals automatically is not the way to go. You could instead
extract the query string from the URL by using parse_url()
<http://php.net/parse-url>, then turn that query string
into variables by
using parse_str() <http://php.net/parse-str>.
--
CC