Change php.ini values from shell script

后端 未结 2 439
情歌与酒
情歌与酒 2021-02-06 11:47

I am new to shell scripts. I am running Vagrant, and find myself needing to adjust these setting in the php.ini:

upload_max_filesize 120M
post_max_size 120M
max_         


        
2条回答
  •  渐次进展
    2021-02-06 12:04

    There is a shell script for this purpose https://github.com/StanAngeloff/vagrant-shell-scripts#php

    php-settings-update(name, value)
    

    Update a PHP setting value. This function will look for all php.ini files in /etc. For each file, a conf.d directory would be created in the parent directory (if one doesn't already exist) and inside a file specifying the setting name/value will be placed.

    Example (create a default timezone):

    php-settings-update 'date.timezone' 'Europe/London'
    

提交回复
热议问题