max_input_time= -1 -1的具体含义是什么?
max_input_time= -1 What is the exact meaning of -1?
我在文档中找不到这个,但找到了:
max_input_time = -1
表示没有限制?
我觉得很奇怪 max_execution_time = 0
是永远的。
但是 -1
对 max_input_time
意味着什么?
快速查看 php.ini
文件会告诉您:
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=60
所以你已经猜对了:
; Default Value: -1 (Unlimited)
//^^^^^^^^^^^^^^
您可以在 github 上看到用于生产和开发的 php.ini
文件:
基本上max_input_time = -1
就是你说的那个指令没有时间限制。
max_input_time = -1 作为最大值。在PHP5.4
中是2147483647
在php.ini
中您会找到问题的答案:
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=60
这指定 -1
是 无限的 因为没有脚本可以用负时间执行。
值 0
表示您不允许脚本 解析数据 或 下载文件。
实际上文档说的不一样:
max_input_time integer
This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time.
文档在这里:
http://php.net/manual/en/info.configuration.php#ini.max-input-time
因此,根据我的理解,php.ini 中提供的评论是错误的。
我在文档中找不到这个,但找到了:
max_input_time = -1
表示没有限制?
我觉得很奇怪 max_execution_time = 0
是永远的。
但是 -1
对 max_input_time
意味着什么?
快速查看 php.ini
文件会告诉您:
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=60
所以你已经猜对了:
; Default Value: -1 (Unlimited)
//^^^^^^^^^^^^^^
您可以在 github 上看到用于生产和开发的 php.ini
文件:
基本上max_input_time = -1
就是你说的那个指令没有时间限制。
max_input_time = -1 作为最大值。在PHP5.4
中是2147483647在php.ini
中您会找到问题的答案:
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=60
这指定 -1
是 无限的 因为没有脚本可以用负时间执行。
值 0
表示您不允许脚本 解析数据 或 下载文件。
实际上文档说的不一样:
max_input_time integer
This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time.
文档在这里: http://php.net/manual/en/info.configuration.php#ini.max-input-time
因此,根据我的理解,php.ini 中提供的评论是错误的。