【问题标题】:PHP: STDOUT vs php://STDOUTPHP:标准输出与 php://STDOUT
【发布时间】:2012-07-20 02:54:05
【问题描述】:

STDOUT和PHP中的php://STDOUT有什么区别?

fwrite(STDOUT, ...);

$StdOut = fopen('php://stdout', 'w');
fwrite($StdOut, ...);

【问题讨论】:

    标签: php io protocols wrapper


    【解决方案1】:

    前者是文件描述符 1,第二个是 FD1 在新 FD 中的副本(例如 3)。

    【讨论】:

      【解决方案2】:

      STDOUT 仅在 CLI sapi 中可用

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-04-08
        • 1970-01-01
        • 2010-10-07
        • 2015-07-31
        • 1970-01-01
        • 2015-08-27
        • 2019-03-30
        • 1970-01-01
        相关资源
        最近更新 更多