setCookie 怪事,请高手出招?
简叔 2004-07-01 11:37:44 我的 Code
<?
header("content-Type: text/html; charset=utf8");
session_start();
$doc_root = "..";
include_once($doc_root."/Conf/Conf.php"); // 无任何输出
include_once($doc_root."/Lib/Functions.class.php"); // 无任何输出
$fun = new FunLib();
// check user password and get basic information
// 0_login failure
// 1_login success
// 2_not manager login
$result = $fun->get_user_info($http_vars["company_no"],strtoupper($http_vars["username"]),strtoupper($http_vars["password"]));
if ($result == 1)
{
// Login success write cookie, store the company id
setCookie("company",$http_vars["company_no"],time()+3600*24*365);
echo $_COOKIE["company"]; // 这里可以拿到值
//Header("Location: $doc_root/BasicInfo/MGRF000.php");
exit;
}
?>
在其它页面拿不到值? 为什么??