<?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-save-path.php',
    1 => 'session_save_path',
    2 => '读取/设置当前会话的保存路径',
  ),
  'up' => 
  array (
    0 => 'ref.session.php',
    1 => 'Session 函数',
  ),
  'prev' => 
  array (
    0 => 'function.session-reset.php',
    1 => 'session_reset',
  ),
  'next' => 
  array (
    0 => 'function.session-set-cookie-params.php',
    1 => 'session_set_cookie_params',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/session/functions/session-save-path.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.session-save-path" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_save_path</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">session_save_path</span> &mdash; <span class="dc-title">读取/设置当前会话的保存路径</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.session-save-path-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>session_save_path</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">$path</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_save_path()</strong></span> 
   返回当前会话的保存路径。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.session-save-path-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">path</code></dt>
     <dd>
      <p class="para">
       指定会话数据保存的路径。如果已经指定且不为 <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>，保存数据的路径将会改变。
       必须在调用 <span class="function"><a href="function.session-start.php" class="function">session_start()</a></span> 函数之前调用
       <span class="function"><strong>session_save_path()</strong></span> 函数。
      </p>
      <p class="para">
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         在某些操作系统上，建议使用可以高效处理
         大量小尺寸文件的文件系统上的路径来保存会话数据。
        </p>
       </p></blockquote>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.session-save-path-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-save-path-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">path</code> 现在可为 null。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.session-save-path-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li>
     <a href="session.configuration.php#ini.session.save-path" class="link">session.save_path</a>
     配置指令。
    </li>
   </ul>
  </p>
 </div>


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