Reply to Re: Accessing URL parameters

Your name:

Reply:


Posted by Aaron Gray on 12/31/07 18:55

"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
news:op.t37ny0i05bnjuv@metallium.lan...
On Mon, 31 Dec 2007 18:45:07 +0100, Aaron Gray <ang.usenet@gmail.com>
wrote:

> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> news:op.t37my9gb5bnjuv@metallium.lan...
>> On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <ang.usenet@gmail.com>
>> wrote:
>>
>>> How do I access URL parameters, and ideally as an associative array ?
>>>
>>> Many thanks in adance,
>>
>> Do you want to examine the URL string?
>> http://www.php.net/parse_url
>> http://www.php.net/parse_str
>>
>> Or in the current request, it's offcourse in the $_GET array.
>
> parse_url() looke helpful, but I wanted the current pages URL parameters,
> is
> the $_GET ?

The parameters from the query string indeed.

http://www.example.com/path/to/file.ext?foo=foz&bar=baz

...will result in a $_GET array while running file.ext:
array(
'foo' => 'foz',
'bar' => 'baz')

If you want other information as well, search the $_SERVER array for your
needs.

Thanks,

Aaron

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация