这个函数偶尔会动不了~不知道为什么~如果没必要可以把跳转放倒客户端,比如用echo 输出javascript 或是html的meta来跳转

解决方案 »

  1.   

    <?php
    header("Location: http://www.example.com/"); /* 重定向浏览器 *//* 确保重定向后,后续代码不会被执行 */
    exit;
    ?>
      

  2.   

    header("Location: http://www.example.com/"); 这样的重新定向不行,在客户端会显示出url:http://www.example.com/
    因为他的原理是象客户端发送一个头信息,让浏览器重新请求http://www.example.com/在jsp中这种技术叫forward而不是redirect 我不要在客户端显示url的那种!谢谢
      

  3.   

    -------------------------------
    header("Location: http://www.example.com/"); 这样的重新定向不行,在客户端会显示出url:http://www.example.com/
    -------------------------------
    会显示吗,真的会显示吗,我怎么从来没看到
      

  4.   

    直接在web服务器里的配置文件定义跳转:apache rewrite模块(自带),iis isapi_rewrite模块(要网上下载)
      

  5.   

    use a simple php file without any html codes,then it will redirect in server.