dongpenggan6812 2014-09-28 11:47
浏览 51
已采纳

从htaccess禁用track_vars

I'm trying to disable php.ini directive track_vars from .htaccess. I use this command

php_flag track_vars 0

On the first line of my .htaccess file. I don't get any errors but when I open my index with this code inside

print_r($_COOKIE);

I get the $_COOKIE array. From the manual:

track_vars boolean

If enabled, then Environment, GET, POST, Cookie, and Server variables can be found in the global associative arrays $_ENV, $_GET, $_POST, $_COOKIE, and $_SERVER.

So what I want to do is NOT populate those arrays automatically. What am I doing wrong?

  • 写回答

1条回答 默认 最新

  • doudu2591 2014-09-28 16:31
    关注

    If you read the line below the one you quoted on this manual page, you will see why this setting has no effect:

    Note that as of PHP 4.0.3, track_vars is always turned on.

    PHP 4.0.3 was released in October 2000. This setting will probably be removed from the manual soon, as it hasn't been relevant to anybody for a very long time.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序