php.ini-recommended has a higher security level than php.ini-dist. The default is to set display_errors to off, magic_quotes_gpc to Off, etc. The corresponding php.ini-dist is the default configuration. So, if you just want to do web testing and general development, use php.ini-dist, otherwise use php.ini-recommended.
For details, please refer to http://www.php.net
Simple explanation:
If you are developing and learning locally, it is recommended to copy php.ini-dist and save it as php .ini
If it is used on the server, for safety, copy php.ini-recommended and save it as php.ini
Application of PhpIniDir
PhpIniDir is the path to PHP's initialization file php.ini. In the past, everyone placed php.ini in the windows directory. In PHP5, the search path for PHP.ini is no longer limited to %SystemRoot% in the PHP4 era. PHP5 will follow the following order Find PHP.ini:
1. PHPIniDir (Apache 2 module only, this command is only used when PHP is used as an Apache module, and does not support PHP running CGI)
2. Registry key value: HKEY_LOCAL_MACHINE/SOFTWARE/PHP/IniFilePath
3. Environment variable: %PHPRC%
4. PHP5 directory (for CLI), or web server directory (for SAPI modules)
5. Windows directory (C: /windows or C:/winnt)
Among these five solutions, it is best to use PHPiniDir when working with Apache2, that is, add the following to the apache2/conf/httpd.conf file:
# configure the path to php.ini
PHPIniDir " C:/php"
In addition, remember to give the server read permission for PHP.ini on NTFS.