第一个warning:session 前面有了输出的内容,比如说echo "hello"; 第二个warning: cache limiter控制缓存以控制象客户端输出的http头信息,它决定了页面内容是放入缓存的规则(rule),如果设置成nocache,那么就禁止任何客户端的caching,如果设置成public,那么你的全局变量就允许cache(允许放入缓存) There is a bug(?) in Internet Explorer v5.5 to do with file downloads over a secure (https) web connection when using sessions. If you have a php script which delivers files for downloading by setting headers for the content-type etc. from a URL like this:getfile.php/filename.ext - or - getfile.php?file=/filename.extand that script uses sessions, then you must explicitly setsession_cache_limiter('public');*before* you use session_start(); 所以,设置session_cache_limiter('public');可解决第二个问题
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
我的code:
session_start();
if(isset($Login))
{
if($userName="" ||$password="")
$err="用户名和密码不能为空!";
else
{
if($userName="phpAdmin" && $password="isAdmin")
{
session_register('phpLogined');
$phpLogined="logined";
echo "login!";
}else
{
$err="用户名或密码错误!";
}
}}
第二个warning:
cache limiter控制缓存以控制象客户端输出的http头信息,它决定了页面内容是放入缓存的规则(rule),如果设置成nocache,那么就禁止任何客户端的caching,如果设置成public,那么你的全局变量就允许cache(允许放入缓存)
There is a bug(?) in Internet Explorer v5.5 to do with file downloads over
a secure (https) web connection when using sessions. If you have a php
script which delivers files for downloading by setting headers for the
content-type etc. from a URL like this:getfile.php/filename.ext
- or -
getfile.php?file=/filename.extand that script uses sessions, then you must explicitly setsession_cache_limiter('public');*before* you use
session_start();
所以,设置session_cache_limiter('public');可解决第二个问题