Re: Re: dealing with # in urls
| From: | Mark | Date: | Fri, 08 Mar 2002 18:21:27 +0000 |
| Subject: | Re: Re: dealing with # in urls | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87802@lists.php.net to get a copy of this message | ||
On Thu, 07 Mar 2002 23:33:00 -0800, CC Zona wrote:
>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?
Yes, and I checked the value of arg_separator.input with phpinfo().
When I try to get it to work with a different character it works
fine, but the # is a problem for some reason, I think php might think
it's a comment or something.
>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>.
I guess I could do that but I really think this is a bug in php, and
since the situation is not really that urgent I guess I'll wait for
the php guys to fix it.