How to check which ini file is loaded in PHP

This snippet will help you check the ini file that is being used.

$inipath = php_ini_loaded_file();

if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
} else {
    echo 'A php.ini file is not loaded';
}

Source

Published by

Mohit Kumar

A simple person who likes to share his thoughts on this blog. Know more about me

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.