mirror of
https://github.com/php/doc-de.git
synced 2026-03-29 18:52:13 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@166853 c90b9560-bf6c-de11-be94-00142212c4b1
99 lines
2.8 KiB
XML
99 lines
2.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- EN-Revision: 1.7 Maintainer: betz Status: ready -->
|
|
|
|
<refentry id="function.apache-request-headers">
|
|
<refnamediv>
|
|
<refname>apache_request_headers</refname>
|
|
<refpurpose>Liefert alle HTTP-Header der aktuellen Anfrage</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Beschreibung</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>apache_request_headers</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Die Funktion <function>apache_request_headers</function> liefert ein
|
|
assoziatives Array zurück, das alle HTTP-Header-Informationen der
|
|
aktuellen HTTP-Anfrage enthält. Diese Funktion wird nur untersstützt,
|
|
wenn PHP als Modul für <productname>Apache</productname> läuft.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>apache_request_headers</function> Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$headers = apache_request_headers();
|
|
|
|
foreach ($headers as $header => $value) {
|
|
echo "$header: $value <br />\n";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Accept: */*
|
|
Accept-Language: en-us
|
|
Accept-Encoding: gzip, deflate
|
|
User-Agent: Mozilla/4.0
|
|
Host: www.example.com
|
|
Connection: Keep-Alive
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
In früheren Versionen als PHP 4.3.0 hieß die Funktion
|
|
<function>apache_request_headers</function>
|
|
<function>getallheaders</function>. Mit PHP 4.3.0 ist
|
|
<function>getallheaders</function> ein Alias für
|
|
<function>apache_request_headers</function>.
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<para>
|
|
Die Werte der gebräuchlichsten CGI-Variablen können Sie auch durch das
|
|
Auslesen der Umgebungsvariablen erhalten. Dieser Weg funktioniert
|
|
unabhängig davon, ob Sie PHP als Modul für
|
|
<productname>Apache</productname> benutzen.
|
|
Benutzen Sie <function>phpinfo</function>, um eine Liste aller zur
|
|
Verfügung stehenden
|
|
<link linkend="language.variables.predefined">Umgebungsvariablen</link>
|
|
zu erhalten.
|
|
</para>
|
|
</note>
|
|
¬e.apache.nsapi-module;
|
|
<para>
|
|
Siehe auch <function>apache_response_headers</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|