开发者

php session not working in 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜