• <bdo id='1Zo7S'></bdo><ul id='1Zo7S'></ul>

    <legend id='1Zo7S'><style id='1Zo7S'><dir id='1Zo7S'><q id='1Zo7S'></q></dir></style></legend>
    <i id='1Zo7S'><tr id='1Zo7S'><dt id='1Zo7S'><q id='1Zo7S'><span id='1Zo7S'><b id='1Zo7S'><form id='1Zo7S'><ins id='1Zo7S'></ins><ul id='1Zo7S'></ul><sub id='1Zo7S'></sub></form><legend id='1Zo7S'></legend><bdo id='1Zo7S'><pre id='1Zo7S'><center id='1Zo7S'></center></pre></bdo></b><th id='1Zo7S'></th></span></q></dt></tr></i><div id='1Zo7S'><tfoot id='1Zo7S'></tfoot><dl id='1Zo7S'><fieldset id='1Zo7S'></fieldset></dl></div>

      <tfoot id='1Zo7S'></tfoot>
      1. <small id='1Zo7S'></small><noframes id='1Zo7S'>

      2. 在 PHP 5.4 中禁用严格标准

        时间:2023-09-21

          • <bdo id='c2BoJ'></bdo><ul id='c2BoJ'></ul>
            <tfoot id='c2BoJ'></tfoot>

                  <tbody id='c2BoJ'></tbody>
                <i id='c2BoJ'><tr id='c2BoJ'><dt id='c2BoJ'><q id='c2BoJ'><span id='c2BoJ'><b id='c2BoJ'><form id='c2BoJ'><ins id='c2BoJ'></ins><ul id='c2BoJ'></ul><sub id='c2BoJ'></sub></form><legend id='c2BoJ'></legend><bdo id='c2BoJ'><pre id='c2BoJ'><center id='c2BoJ'></center></pre></bdo></b><th id='c2BoJ'></th></span></q></dt></tr></i><div id='c2BoJ'><tfoot id='c2BoJ'></tfoot><dl id='c2BoJ'><fieldset id='c2BoJ'></fieldset></dl></div>
                • <legend id='c2BoJ'><style id='c2BoJ'><dir id='c2BoJ'><q id='c2BoJ'></q></dir></style></legend>

                  <small id='c2BoJ'></small><noframes id='c2BoJ'>

                  本文介绍了在 PHP 5.4 中禁用严格标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我目前在 php 5.4 上运行一个站点,在此之前我在 5.3.8 上运行我的站点.不幸的是,php 5.4 结合了 E_ALLE_STRICT,这意味着我之前对 error_reporting 的设置现在不起作用.我以前的值是 E_ALL &~E_NOTICE &~E_STRICT 我应该一次只启用一个值吗?

                  I'm currently running a site on php 5.4, prior to this I was running my site on 5.3.8. Unfortunately, php 5.4 combines E_ALL and E_STRICT, which means that my previous setting for error_reporting does not work now. My previous value was E_ALL & ~E_NOTICE & ~E_STRICT Should I just enable values one at a time?

                  我有太多错误,而且文件包含太多代码需要我修复.

                  I have far too many errors and the files contain too much code for me to fix.

                  推荐答案

                  正如评论者所说,最佳选项是修复错误,但在时间或知识有限的情况下,这并不总是可行的.在您的 php.ini 更改

                  As the commenters have stated the best option is to fix the errors, but with limited time or knowledge, that's not always possible. In your php.ini change

                  error_reporting = E_ALL
                  

                  error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
                  

                  如果您无权访问 php.ini,您可以将其放入您的 .htaccess 文件中:

                  If you don't have access to the php.ini, you can potentially put this in your .htaccess file:

                  php_value error_reporting 30711
                  

                  这是 E_ALL 值 (32767) 以及删除 E_STRICT (2048) 和 E_NOTICE (8) 值.

                  This is the E_ALL value (32767) and the removing the E_STRICT (2048) and E_NOTICE (8) values.

                  如果您无权访问 .htaccess 文件或它未启用,您可能需要将它放在从浏览器调用加载的任何脚本的 PHP 部分的顶部:

                  If you don't have access to the .htaccess file or it's not enabled, you'll probably need to put this at the top of the PHP section of any script that gets loaded from a browser call:

                  error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
                  

                  其中之一应该可以帮助您使用该软件.通知和严格的内容是问题或潜在问题的指标,您可能会发现某些代码在 PHP 5.4 中无法正常工作.

                  One of those should help you be able to use the software. The notices and strict stuff are indicators of problems or potential problems though and you may find some of the code is not working correctly in PHP 5.4.

                  这篇关于在 PHP 5.4 中禁用严格标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何捕获此错误:“注意:未定义偏移量:0" 下一篇:如何让 PHP 在出错时产生回溯?

                  相关文章

                  最新文章

                • <legend id='MKrVW'><style id='MKrVW'><dir id='MKrVW'><q id='MKrVW'></q></dir></style></legend>

                  <small id='MKrVW'></small><noframes id='MKrVW'>

                      <bdo id='MKrVW'></bdo><ul id='MKrVW'></ul>
                    1. <tfoot id='MKrVW'></tfoot>

                      <i id='MKrVW'><tr id='MKrVW'><dt id='MKrVW'><q id='MKrVW'><span id='MKrVW'><b id='MKrVW'><form id='MKrVW'><ins id='MKrVW'></ins><ul id='MKrVW'></ul><sub id='MKrVW'></sub></form><legend id='MKrVW'></legend><bdo id='MKrVW'><pre id='MKrVW'><center id='MKrVW'></center></pre></bdo></b><th id='MKrVW'></th></span></q></dt></tr></i><div id='MKrVW'><tfoot id='MKrVW'></tfoot><dl id='MKrVW'><fieldset id='MKrVW'></fieldset></dl></div>