<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.session.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.session-module-name.php',
    1 => 'session_module_name',
    2 => '获取/设置会话模块名称',
  ),
  'up' => 
  array (
    0 => 'ref.session.php',
    1 => 'Session 函数',
  ),
  'prev' => 
  array (
    0 => 'function.session-id.php',
    1 => 'session_id',
  ),
  'next' => 
  array (
    0 => 'function.session-name.php',
    1 => 'session_name',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/session/functions/session-module-name.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.session-module-name" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_module_name</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">session_module_name</span> &mdash; <span class="dc-title">获取/设置会话模块名称</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.session-module-name-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>session_module_name</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">$module</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.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="para rdfs-comment">
   <span class="function"><strong>session_module_name()</strong></span> 
   获取或设置会话模块名称，也被称做：<a href="session.configuration.php#ini.session.save-handler" class="link">session.save_handler</a>。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.session-module-name-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">module</code></dt>
     <dd>
      <p class="para">
       如果指定 <code class="parameter">module</code> 参数并且不是 <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>，
       则使用指定值作为会话模块。
       禁止传入 <code class="literal">&quot;user&quot;</code> 作为此参数的值，
       请使用 <span class="function"><a href="function.session-set-save-handler.php" class="function">session_set_save_handler()</a></span> 来设置用户自定义的会话处理器。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.session-module-name-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回当前所用的会话模块名称,  或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.session-module-name-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">module</code> 现在可以为空。
      </td>
     </tr>

     <tr>
      <td>7.2.0</td>
      <td>
       不允许设置模块名称为 <code class="literal">&quot;user&quot;</code>。 
       在之前的版本中，如果设置为 &quot;user&quot;，那么会被静默的忽略到。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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