大家好:
我初学php ,遇到一个问题,我当前服务器系统是linux , 上面运行apache 的cgi 来执行用户的请求。
假设我建立php 的一个测试文件test.php,其中就一句话,fwrite(STDOUT , "this is a test"); 
我通过ie浏览器的地址栏执行此测试程序,无法得到正常输出,但我在服务器端linux shell 下直接运行
此test.php 能看到输出。
我又修改test.php 如下内容:$out=fopen("php://stdout", 'w');  fwrite($out , "this is a test");
情况依然如上,ie 浏览器无法正常浏览到内容,但shell 下能正常看到输出。我又修改test.php 如下内容:$out=fopen("php://output",'w'); fwrite($out , "this is a test");
这次 ie 浏览器上能看到正常的输出,shell 下也能看到正常输出。我又尝试修改 test.php 如下: echo("this is a test"); 
这次ie 正常,shell 下也正常。我的问题是, STDOUT , php://stdout , php://output 这3个有什么区别,为什么除了 php://output 
以外 apache 没能把程序的标准输出给重定向到正确的cgi 上?