<%
dim user
user= session( "user ")
if user= " " then
user=Request.Cookies( "user ")
if user= " " then
user=getuser()
Response.Cookies( "user ")=user
Response.Cookies( "user ").Expires=#January 01, 2036#
end if
end if
session( "user ")=user
function getuser()
;
end function
%>
------解决方案--------------------
<?php
$user= $_SESSION( 'user ');
if ($user== ' '){
$user=$_COOKIE( 'user ');
if ($user== ' '){
$user=getuser();
setcookie( 'user ',user,time()+30*365*24*60*60);
}
}
$_SESSION( 'user ')=$user;
function getuser(){
}
?>
------解决方案--------------------
<?php
$user=$_SESSION[ 'user '];
if($user== " ")
{
$user=$_COOKIE[ 'user '];
if($user== " ")
{
$user=getuser();
setcookie( "user ",$user,99999999);
}
}
$_SESSION[ 'user ']=$user;
function getuser()
{
;
}
?>
我印象里,asp的=号也是赋值的啊,if user= " "是判断user为空还是赋空值?
------解决方案--------------------
我印象里,asp的=号也是赋值的啊,if user= " "是判断user为空还是赋空值?
----------------------------
在判断的时候是判断,在贬值的是时候是贬值.
if user= " " 判断
user= " " 贬值.
------解决方案--------------------
is auto to comp
------解决方案--------------------
<?php
$user= $_SESSION( 'user ');
if ($user== ' '){
$user=$_COOKIE( 'user ');
if ($user== ' '){
$user=getuser();
setcookie( 'user ',user,time()+30*365*24*60*60);
}
}
$_SESSION( 'user ')=$user;
function getuser(){
}
?>