Nk_php_ini_stats
Description
Find additional php ini files in the user’s docroot.
Example
[root@cloudvpsserver ~]# nk_php_ini_stats nkern.net Domain | PHP-Version | .user.ini php.ini | --- - --- - --- --- - nkern.net | ea-php81 | No No |
Code
nk_php_ini_stats() { if [ "$1" = "" ]; then echo "You must provide a domain name" return 0 fi domain="$1" docroot="$(nk_docroot "$domain")" php_version="$(nk_php_version "$domain")" user_ini_file="$docroot/.user.ini" php_ini_file="$docroot/php.ini" if [ -f "$user_ini_file" ]; then user_ini_result="Yes" else user_ini_result="No" fi if [ -f "$php_ini_file" ]; then php_ini_result="Yes" else php_ini_result="No" fi gen_php_ini_body() { echo "Domain | PHP-Version | .user.ini php.ini |" echo "--- - --- - --- --- -" echo "$domain | $php_version | $user_ini_result $php_ini_result |" } gen_php_ini_body | column -t }