开发者

php session not working in Version 5.1.6

开发者 https://www.devze.com 2023-01-23 02:03 出处:网络
Hello My question is very basic one just tell me why this code which is working fine on all others php vesions not working in PHP Version 5.1.6

Hello My question is very basic one just tell me why this code which is working fine on all others php vesions not working in PHP Version 5.1.6

Code is

"

 session_start(); 

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else{

$_SESSION['views']=1;}
echo开发者_开发百科 "Views=". $_SESSION['views'];

Plz reply soon any help will be apprieciable


session_start(); 
$_SESSION['views'] = isset($_SESSION['views']) ? $_SESSION['views']+1 : 1;

EDIT : question has been edited when I wrote this, don't know if it will change anything.

0

精彩评论

暂无评论...
验证码 换一张
取 消