Posts

Showing posts with the label window

Find PHP ini file

  php -i | grep "Loaded Configuration File"       php -i | findstr /c:"Loaded Configuration File" The two commands provided are used to determine the path of the PHP configuration file (php.ini) that is currently loaded by the PHP interpreter. Below, I’ll explain what each command does and why there are two different versions. Breakdown of the Commands Common Part: php -i Both commands start with php -i . This runs PHP from the command line and outputs detailed information about the PHP configuration, including settings, extensions, and the loaded configuration file. It’s similar to calling the phpinfo() function in a PHP script but displays the output in the terminal. The Pipe: | The | symbol is a pipe, which takes the output of php -i and sends it as input to the next command for further processing. First Command: php -i | grep "Loaded Configuration File" What it does : grep is a command-line tool used in Unix-like systems (e.g., Linux, macOS) to s...