Home > Backend Development > PHP Tutorial > session problem

session problem

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-10-11 14:23:52
Original
1010 people have browsed it

How to encapsulate session and cookies in native PHP? It is too troublesome to write session_start(); for every page.

Reply content:

How to encapsulate session and cookies in native PHP? It is too troublesome to write session_start(); for every page.

Can be found in the unified entry file @session_start();
or modify the php.ini configuration file
(if not, add it), modify it to:

<code>session.auto_start = On  # 默认自动开启session</code>
Copy after login

Using single-entry mode, all requests are forwarded through a PHP. All popular frameworks use single-entry mode.

Related labels:
php
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