mirror of
https://github.com/php/doc-es.git
synced 2026-03-25 16:02:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@316579 c90b9560-bf6c-de11-be94-00142212c4b1
116 lines
2.8 KiB
XML
116 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 3a29c12dc213a208e868ba1d1a7b8530e90ab5f3 Maintainer: andresdzphp Status: ready -->
|
|
|
|
<refentry xml:id="function.headers-list" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>headers_list</refname>
|
|
<refpurpose>Devuelve una lista de encabezados de respuesta enviados (o listos para enviar)</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>headers_list</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>headers_list</function> devolverá una lista de encabezados
|
|
a ser enviados al navegador / cliente. Para determinar si se han enviado o no
|
|
estos encabezados, use <function>headers_sent</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve un array indexado numéricamente de encabezados.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplos usando <function>headers_list</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
/* setcookie() agrega una cabecera de respuesta propia */
|
|
setcookie('foo', 'bar');
|
|
|
|
/* Definir un encabezado de respuesta personalizado
|
|
Este será ignorado por la mayoría de los clientes */
|
|
header("X-Sample-Test: foo");
|
|
|
|
/* Especificar el contenido de texto plano en nuestra respuesta */
|
|
header('Content-type: text/plain');
|
|
|
|
/* ¿Qué encabezados se van a enviar? */
|
|
var_dump(headers_list());
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
array(4) {
|
|
[0]=>
|
|
string(23) "X-Powered-By: PHP/5.1.3"
|
|
[1]=>
|
|
string(19) "Set-Cookie: foo=bar"
|
|
[2]=>
|
|
string(18) "X-Sample-Test: foo"
|
|
[3]=>
|
|
string(24) "Content-type: text/plain"
|
|
}
|
|
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.network.header.sapi;
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>headers_sent</function></member>
|
|
<member><function>header</function></member>
|
|
<member><function>setcookie</function></member>
|
|
<member><function>apache_response_headers</function></member>
|
|
<member><function>http_response_code</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
|
|
-->
|