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

Some strange problems with session in PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 14:57:08879browse

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...
Statement:
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