downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

HttpQueryString::get> <HttpQueryString sınıfı
Last updated: Fri, 13 Nov 2009

view this page in

HttpQueryString::__construct

(PECL pecl_http >= 0.22.0)

HttpQueryString::__constructHttpQueryString kurucusu

Açıklama

final public void HttpQueryString::__construct ([ bool $küresel = true [, mixed $ek ]] )

HttpQueryString nesnesinin yeni bir örneğini oluşturur.

küresel değiştirgesinin değeri TRUE olduğu takdirde $_GET ve $_SERVER['QUERY_STRING'] üzerlerinde işlem yapar.

Değiştirgeler

küresel

$_GET ve $_SERVER['QUERY_STRING'] üzerinde işlem yapılıp yapılmayacağı belirtilir.

ek

Ek/ilk sorgu dizgesi değiştirgeleri.

Hatalar/İstisnalar

HttpRuntimeException istisnası yakalanır.



add a note add a note User Contributed Notes
HttpQueryString::__construct
michal dot kocarek at brainbox dot cz
11-Jun-2009 02:19
Note about first argument when calling the constructor:
– if true, instance will have initially exactly same query string as PHP received when user accessed the page
– if false, instance will be empty.

<?php
// Imagine that user puts "test.php?name=JamesBond&age=30" into browser, then…

$query = new HttpQueryString(); // query is "name=JamesBond&age=30". (First argument is true by default.)
$query = new HttpQueryString(false); // query is empty
$query = new HttpQueryString(true, 'age=31'); // query is "name=JamesBond&age=31", name was preserved, age was updated
$query = new HttpQueryString(false, 'age=31'); // query is "age=31"
?>

Second argument can be string and associative array, same as for HttpQueryString->set() method.

HttpQueryString::get> <HttpQueryString sınıfı
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites