Home > Backend Development > PHP Tutorial > Some strange problems with session in PHP_PHP Tutorial

Some strange problems with session in PHP_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 14:57:08
Original
888 people have browsed it

echo $_SESSION["kfGid"];//is 0005
$kfGid = $rs["kfGid"];//0001
echo $_SESSION["kfGid"];//actually becomes 0001

Solve the method:

1.php version parsing problem. For security reasons, you'd better not write this. Just change $kfGid to something else.

2.php.ini register_global is changed to off

In order to improve security, register_global is generally set to off

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364131.htmlTechArticleecho $_SESSION[kfGid];//is 0005 $kfGid = $rs[kfGid];//0001 echo $_SESSION[kfGid];//It turned into 0001. Solution: 1. PHP version parsing problem. For safety's sake, you'd better not do this...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template