Set path to php.ini

后端 未结 3 780
囚心锁ツ
囚心锁ツ 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条回答
  •  清歌不尽
    2020-12-11 06:09

    Add this to your server configuration...

    
    PHPINIDir /path/to/new/php_ini
    
    

    Make sure to just include the path to the directory, not the entire path to the file.

    Then restart Apache.

    Check it worked with phpinfo().

提交回复
热议问题