服务端:header("location:URL"); 如出错,Cannot modify header information - headers already sent by... 设置ob_start(); 和ob_end_flush(); 客户端 location.href=URL;