词条 | session.cache_expire |
释义 | session.cache_expire
说明intsession_cache_expire([ string$new_cache_expire] )session_cache_expire()返回session.cache_expire的设置值. 缓存期限在每次请求启动的时候,被设置为保存在session.cache_expire里的默认值180分钟。因此,必须在每次请求时候调用session_cache_expire()(在session_start()调用前调用)。 参数new_cache_expire 设置当前cache expire时间 注意: 只有在session.cache_limiter设置的值不是 nocache的时候,new_cache_expireis才有效。 返回值返回当前设置session.cache_expire的值,单位是分钟。 范例Example #1 session_cache_expire()example <?php /* set the cache limiter to 'private' */ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); /* set the cache expire to 30 minutes */ session_cache_expire(30); $cache_expire = session_cache_expire(); /* start the session */ session_start(); echo "The cache limiter is now set to $cache_limiter<br />"; echo "The cached session pages expire after $cache_expire minutes"; ?> |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。