Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that php5.3 does not support session_register () this function is enabled

Shulou Source: shulou.com Published: 2022-06-03 07:40:47 09月22日 Update

This article mainly introduces "how to solve the problem that php5.3 does not support session_register () this function has been enabled". In daily operation, I believe many people have doubts about how to solve the problem that php5.3 does not support session_register () this function has been enabled. The editor consulted all kinds of materials and sorted out a simple and useful operation method. I hope it will be helpful for you to answer the question "how to solve the problem that php5.3 does not support session_register () this function has been enabled"! Next, please follow the editor to study!

Php upgraded from 5.2.x to 5.3.2. Some programs that can be used have been reported incorrectly.

The content of the error is

Deprecated: Function session_register () is deprecated

Check that it is 5.3. this session_register will not be used, will it be lowered back? I'm not happy.

After a search, one solution is to write a function.

The copy code is as follows:

Checked that there are not many places where this problem occurred, and found another way, directly

Put

Session_register ("abc")

Change to

$_ SESSION ['abc'] = null

Can

The change of session in php5.3

Running the code in the book in php5.3 will give you the following hints:

Function session_is_registered () is deprecated in

Function session_register () is deprecated in

It means that these two functions are disapproved and disused.

The following is the code in the php official manual, and the comments section has already stated that session_register () is not approved.

The copy code is as follows:

Tags: Functions questions code support learning methods tips more help practical next two content place official meaning manual article clarity comments Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Docker Shulou Technology macOS MySQL