<?php
if(setcookie("namedd","dede",time()+3600))
echo "chengong";
else "shibai";
echo "wocaocao";
echo “Hello Everyone!”;
setcookie("passwddd","86898162",time()+3600);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>登录页面</title>
</head><form method="post" action="insert1.php" name="send" onSubmit="return Check()">
后面太多了。。就不贴了。。但是 前面的 PHP语句 根本没执行。。无打印。无输出。setcookie不执行。
if(setcookie("namedd","dede",time()+3600))
echo "chengong";
else "shibai";
echo "wocaocao";
echo “Hello Everyone!”;
setcookie("passwddd","86898162",time()+3600);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>登录页面</title>
</head><form method="post" action="insert1.php" name="send" onSubmit="return Check()">
后面太多了。。就不贴了。。但是 前面的 PHP语句 根本没执行。。无打印。无输出。setcookie不执行。
setcookie("namedd","dede",time()+3600);
然后再检查if(isset($_SESSION['namedd'])){
print_r($_SESIION['namedd']);
}else{
echo '没有设置名字为这个的session';
}
setcookie("namedd","dede",time()+3600);
然后再检查if(isset($_COOKIE['namedd'])){
print_r($_COOKIE['namedd']);
}else{
echo '没有设置名字为这个的COOKIE';
}
你可以查看一下,你url是你改的页面吗,别犯低级错误了