php 学习之 session

WBOY
Release: 2016-06-23 14:33:16
Original
793 people have browsed it

老版本 php 中开发的程序,使用 register_session 语句注册的 session 在 php 5 中不能生效,解决办法是设定 php.ini 中:
register_globals = On
这个选项在 php4, 5 中默认是 Off.

如果使用 $_SESSION, 就不要使用 session_register(),  session_is_registered(), session_unregister().

register_session 之前如果没有调用过 session_start(), 则会隐式调用它。使用 $_SESSION 必须手工调用 session_start()

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template