<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.network.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.header-remove.php',
    1 => 'header_remove',
    2 => 'Elimina un encabezado HTTP',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Funciones de red',
  ),
  'prev' => 
  array (
    0 => 'function.header-register-callback.php',
    1 => 'header_register_callback',
  ),
  'next' => 
  array (
    0 => 'function.headers-list.php',
    1 => 'headers_list',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/network/functions/header-remove.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.header-remove" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">header_remove</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">header_remove</span> &mdash; <span class="dc-title">Elimina un encabezado HTTP</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.header-remove-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>header_remove</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$name</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Elimina un encabezado HTTP previamente añadido con
   <span class="function"><a href="function.header.php" class="function">header()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.header-remove-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       El nombre del encabezado a eliminar. Si es <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, todos los encabezados definidos previamente son eliminados.
      </p>
      <blockquote class="note"><p><strong class="note">Nota</strong>: 
       <span class="simpara">
        Este argumento no distingue entre mayúsculas y minúsculas.
       </span>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.header-remove-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   No se retorna ningún valor.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.header-remove-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">name</code> ahora es nullable.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.header-remove-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Eliminar un encabezado HTTP con <span class="function"><strong>header_remove()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />header</span><span style="color: #007700">(</span><span style="color: #DD0000">"X-Foo: Bar"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"X-Bar: Baz"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header_remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"X-Foo"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">X-Bar: Baz</pre>
</div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Ejemplo #2 Eliminar todos los encabezados HTTP con <span class="function"><strong>header_remove()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />header</span><span style="color: #007700">(</span><span style="color: #DD0000">"X-Foo: Bar"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"X-Bar: Baz"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header_remove</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode"></pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.header-remove-notes">
  <h3 class="title">Notas</h3>
  <div class="caution"><strong class="caution">Precaución</strong>
   <p class="para">
    Esta función elimina <em>todos</em> los encabezados
    configurados por PHP, incluyendo cookies, sesiones y los encabezados
    <code class="literal">X-Powered-By</code>.
   </p>
  </div>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
 <p class="para">
  Los encabezados solo serán accesibles y se mostrarán cuando se utilice un SAPI que los soporte.
 </p>
</p></blockquote>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.header-remove-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.header.php" class="function" rel="rdfs-seeAlso">header()</a> - Env&iacute;a un encabezado HTTP bruto</span></li>
    <li><span class="function"><a href="function.headers-sent.php" class="function" rel="rdfs-seeAlso">headers_sent()</a> - Indica si los encabezados HTTP ya han sido enviados</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>