'Overwrite' php.ini settings

前端 未结 5 949
忘了有多久
忘了有多久 2020-12-21 08:30

I have a folder, and for all php files in that folder (or even better, in that folder or any folders within it) I\'d like to make some changes to the php settings. Can I jus

5条回答
  •  囚心锁ツ
    2020-12-21 09:17

    The .htaccess files are typically the best way to go for an Apache server. However, to answer your original question, yes you can set a php.ini file in every directory if you want. However, in order for it to work, PHP must be set to run as PHP-CGI. My guess is that you are running PHP as an Apache module.

    See this link for reference on where PHP looks for php.ini and when it looks for it: http://www.php.net/manual/en/configuration.file.php

提交回复
热议问题