<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mbstring.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.mb-http-input.php',
    1 => 'mb_http_input',
    2 => 'Определяет кодировку символов входных данных HTTP-запроса',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Функции для работы с многобайтовыми строками',
  ),
  'prev' => 
  array (
    0 => 'function.mb-get-info.php',
    1 => 'mb_get_info',
  ),
  'next' => 
  array (
    0 => 'function.mb-http-output.php',
    1 => 'mb_http_output',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/mbstring/functions/mb-http-input.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-http-input" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_http_input</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mb_http_input</span> &mdash; <span class="dc-title">
   Определяет кодировку символов входных данных HTTP-запроса
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mb-http-input-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_http_input</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">$type</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   Определяет кодировку символов входных данных HTTP-запроса.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-http-input-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">type</code></dt>
     <dd>
      <p class="para">
       Строка запроса задаёт тип входных данных.
       Значение <code class="literal">«G»</code> для GET запроса, <code class="literal">«P»</code> для POST запроса,
       <code class="literal">«C»</code> для COOKIE, <code class="literal">«S»</code>
       для строк, <code class="literal">«L»</code> для списка и <code class="literal">«I»</code> для всего вместе
       (будет возвращён массив (<span class="type"><a href="language.types.array.php" class="type array">array</a></span>)).
       Если аргумент опущен, функция вернёт последний обработанный тип входных данных.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-http-input-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает название кодировки символов для заданного типа
   (<code class="parameter">type</code>) или массив имён символьных кодировок, если
   параметр <code class="parameter">type</code> задан как <code class="literal">«I»</code>. Если
   функция <span class="function"><strong>mb_http_input()</strong></span> не может обработать
   HTTP-запрос, она вернёт <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.mb-http-input-errors">
  <h3 class="title">Ошибки</h3>
  <p class="simpara">
   Функция выбрасывает ошибку <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span>, если
   значение параметра <code class="parameter">type</code> некорректно.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mb-http-input-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Функция <span class="function"><strong>mb_http_input()</strong></span> теперь выбрасывает ошибку
       <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span>, если значение параметра
       <code class="parameter">type</code> некорректно.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       Параметр <code class="parameter">type</code> теперь может принимать значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-http-input-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mb-internal-encoding.php" class="function" rel="rdfs-seeAlso">mb_internal_encoding()</a> - Устанавливает или получает внутреннюю кодировку символов файла скрипта</span></li>
    <li><span class="function"><a href="function.mb-http-output.php" class="function" rel="rdfs-seeAlso">mb_http_output()</a> - Устанавливает или получает кодировку символов HTTP-вывода</span></li>
    <li><span class="function"><a href="function.mb-detect-order.php" class="function" rel="rdfs-seeAlso">mb_detect_order()</a> - Устанавливает или получает порядок определения кодировки символов</span></li>
   </ul>
  </p>
 </div>


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