在服务器端,PHP还有其他方法吗?

解决方案 »

  1.   

    不可能了吧
    你可看看关于CGI原理的书
      

  2.   

    PHP为什么没有象ASP的response.redirect()一样的函数呢?
    用javascript要多一次客户端和服务器的交流:(
      

  3.   

    http://www.csdn.net/expert/topic/528/528449.xml
      

  4.   

    phpinfo():
    我在用header()的时候经常会碰到“Warning: Cannot add header information - headers already sent by”的错误,可能是我在这之前做了include之类的操作。我的意思是我觉得header("Location: "); 好象不能随心所欲的用,或者是我没有真正明白该怎样用,请指教!
    Mistruster(弱智d):
    我看那个页面了,好象也是用JS在客户端进行再调用,这是我想避免的
      

  5.   

    asp的response.redirect 的实质是跟header()一样的
    不过asp用了输出缓存,在用redirect时可以放弃前面的输出而实现,
    如果关掉的话,会跟php一样的!
    php在新的几版中也提供了缓存函数,到www.php.net可以看到详细的内容。
      

  6.   

    谢谢 darkwing!
    那么如何随心所欲的用header("Location: "); 呢?
      

  7.   

    随心所欲: <?php 
      global $error;
      //do something to $error
      if($error==true){//redirect
     ?>
     <script language=javascript>
      navigate("http://cgi-bin/error.htm");
     </script>
     <?
      }
     ?>
      

  8.   

    要怎样的随心所欲?
    header("Location: a.htm");  当前路径的文件
    header("Location: ya/a.htm"); 子目录的文件
    header("Location: http://www.asb.com"); urlphp可以在php.ini中设置
    output_buffering = On 来实现对其他的php设置,请参照我翻译的php.ini的中文注解。
    http://www.phpuser.com
    http://phpuser.com/misc/php.ini.txt
      

  9.   

    如我所说,再怎么印象不好,也只能用这个方法。
    asp的也一样。