Convert / extract phpinfo () in php.ini

I am thinking about how to replicate a PHP environment to configure hosts for offline local development. The idea is to parse the output of phpinfo () and write any parameter values ​​it contains to local php.ini. I would suggest that all ism are included in phpinfo and that certain things will be specific only to the environment it works on (paths).

+3
source share
2 answers

You will probably get more useful results from ini_get_all ()

http://us.php.net/manual/en/function.ini-get-all.php

Then you can traverse the linked array to restore the ini file without any difficulty in interpreting the output of phpinfo ()

+4
source

, . , php.ini, , , ( ).

0

Source: https://habr.com/ru/post/1697187/


All Articles