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

search for in the

virtual> <ebcdic2ascii
Last updated: Sun, 25 Nov 2007

view this page in

getallheaders

(PHP 4, PHP 5)

getallheaders — Vyvolá všetky hlavičky HTTP požiadavky

Popis

array getallheaders ( void )

getallheaders() je alias pre apache_request_headers(). Vráti asociatívne pole všetkých HTTP hlavičiek v aktuálnej požiadavke. Prosím, prečítajte si dokumentáciu ku apache_request_headers() a získajte viac informácií o tom, ako táto funkcia pracuje.

Note: V PHP 4.3.0, getallheaders() sa stal aliasom pre apache_request_headers(). V podstate bola premenovaná. Je to kvôli tomu, že táto funkcia pracuje iba keď je PHP kompilované ako Apache Modul.

Note: Od PHP 4.3.3 vyššie môžete používať túto funkciu tiež s serverovým modulom NSAPI vo webserveroch Netscape/iPlanet/SunONE.

Tiež pozri apache_request_headers().



add a note add a note User Contributed Notes
getallheaders
joyview at gmail dot com
06-Jul-2008 08:52
it could be useful if you using nginx instead of apache

if (!function_exists('getallheaders'))
{
    function getallheaders()
    {
       foreach ($_SERVER as $name => $value)
       {
           if (substr($name, 0, 5) == 'HTTP_')
           {
               $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
           }
       }
       return $headers;
    }
}
lorro at lorro dot hu
19-Apr-2005 06:25
Beware that RFC2616 (HTTP/1.1) defines header fields as case-insensitive entities. Therefore, array keys of getallheaders() should be converted first to lower- or uppercase and processed such.

virtual> <ebcdic2ascii
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites