mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
128 lines
3.2 KiB
XML
128 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: d278431ef5e561787093a7b2679327a615b09367 Maintainer: ae Status: ready --><!-- CREDITS: adiel, ae, fabioluciano -->
|
|
<!-- splitted from ./en/functions/apache.xml, last change in rev 1.2 -->
|
|
<refentry xml:id="function.apache-request-headers" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>apache_request_headers</refname>
|
|
<refpurpose>Obtém todos os cabeçalhos da requisição HTTP</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>array</type><type>false</type></type><methodname>apache_response_headers</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Obtém todos os cabeçalhos HTTP da requisição atual. Funciona na
|
|
CLI e nos servidores web Apache, FastCGI e FPM.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Um array associativo de todos os cabeçalho HTTP da requisição atual, ou
|
|
&false; em caso de falha.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
Esta função tornou-se disponível na SAPI FPM.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemplo da função <function>apache_request_headers</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$headers = apache_request_headers();
|
|
|
|
foreach ($headers as $header => $value) {
|
|
echo "$header: $value <br />\n";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<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>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Você também pode obter o valor das variáveis <acronym>CGI</acronym> comuns
|
|
lendo-as do ambiente, o que funciona independentemente
|
|
de você estar usando o PHP como um módulo do <productname>Apache</productname> ou não. Utilize
|
|
a função <function>phpinfo</function> para ver uma lista de todas as
|
|
<link linkend="language.variables.predefined">variáveis de ambiente</link> disponíveis.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>apache_response_headers</function></member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|