【问题标题】:php_value output_buffering don't work normalphp_value output_buffering 不能正常工作
【发布时间】:2016-11-15 02:07:49
【问题描述】:

我不知道为什么,但是如果我写这个

.htaccess

php_value output_buffering off

.php

<?php
    echo "LVL OB: ".ob_get_level()."<br>";
?>

我明白了:“LVL OB: 0” - 我认为这很正常,OB 已关闭。

但是,如果我写这个

.htaccess

php_value output_buffering on

.php

<?php
    echo "LVL OB: ".ob_get_level()."<br>";
?>

我得到这个:“LVL OB:0” - 为什么我得到 0? OB开播了!为什么?请在这个时候给我解释一下。

P.S PHP 5.6 是否重要

【问题讨论】:

    标签: php buffer


    【解决方案1】:

    使用 phpinfo() 检查您的服务器上是否启用了 output_buffering, 如果没有,它应该显示一些整数值,然后您可以先在 php.ini 中启用它。 完成上述操作后,您不必再次在 .htaccess 中添加“php_value output_buffering on”

    【讨论】:

    猜你喜欢
    • 2013-03-30
    • 2010-11-30
    • 2021-10-02
    • 2017-08-06
    • 2013-11-22
    • 1970-01-01
    • 2013-09-10
    • 2017-04-05
    • 2013-07-25
    相关资源
    最近更新 更多