【问题标题】:What are the list of ini_set() function cannot be overridden by php script?php 脚本不能覆盖的 ini_set() 函数列表有哪些?
【发布时间】:2011-12-07 10:53:50
【问题描述】:

我不知道是否可以覆盖 php 脚本中的所有 ini_set()!。例如,我们可以使用 php 脚本更改 memory_limit 的 ini_set 值。但是我的一个朋友说,无法在 php 脚本中设置/更改某些 ini_set() 的值。谁能列出 ini_set() 函数?

对不起我的英语不好!

【问题讨论】:

    标签: php


    【解决方案1】:
    ini_get_all( null, TRUE);
    

    示例:

        [safe_mode_include_dir] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 4
        )
    

    什么是 access = 4?
    http://www.php.net/manual/en/configuration.changes.modes.php

    PHP_INI_USER 1 = 可以在用户脚本中设置条目 (如使用 ini_set())或在 Windows 注册表中 PHP_INI_PERDIR 6 = 可以在 php.ini、.htaccess 或 httpd.conf 中设置条目 PHP_INI_SYSTEM 4 = 可以在 php.ini 或 httpd.conf 中设置条目 PHP_INI_ALL 7 = 可以在任何地方设置条目

    为了回答你的问题,那些访问权限是 1 或 7 可以在 php 脚本中设置

    【讨论】:

      【解决方案2】:

      Google 是你的朋友。

      http://www.php.net/manual/en/ini.list.php

      【讨论】:

        【解决方案3】:

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-05-09
          • 2011-06-11
          • 2012-06-28
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多