为什么你可以将php.ini变量放入.htaccess?

djm*_*i11 0 php apache .htaccess config

在主题中 - 为什么你可以把它们放在.htaccess中.

我一直以为它应该在php.ini中,而不是在.htaccess中.

的.htaccess

php_value max_execution_time 240
php_value max_input_time 111
Run Code Online (Sandbox Code Playgroud)

php.ini中

max_execution_time 240
max_input_time 111
Run Code Online (Sandbox Code Playgroud)

为什么会那样?

pju*_*ble 7

共享Web主机上的人通常无法访问php.ini文件,因此可以方便地覆盖.htaccess文件中的某些PHP设置(如果您确实需要).