Set path to php.ini

后端 未结 3 774
囚心锁ツ
囚心锁ツ 2020-12-11 05:39

Is it possible to have just a single php.ini file, for example in the webroot (or even outside of it to prevent people accessing it via GET), and tell PHP quickly and easily

3条回答
  •  -上瘾入骨i
    2020-12-11 06:15

    Have a look at .user.ini section at the php docs.

    Since PHP 5.3.0, PHP includes support for .htaccess-style INI files on a per-directory basis.

    But beside the .unser.ini solution you can place an additional ini file in the "additional .ini files parsed" directory. There you can use one single ini file to overwrite all other settings. Name it with zzz at the beginning and it will be parsed at last. This is also easy for your hoster to deploy without destroying his settings.

提交回复
热议问题