PHP - config file location

Method 1

Create info.php with code above and open the file in your browser
    
    phpinfo();
    
You will see the path to the php.ini like in the following screenshot

Method 2

For Linux based OS
    
    php -i | grep "Loaded Configuration File"
    
For Windows
    
    php -i | findstr /c:"Loaded Configuration File"
    

Comments